Issue after upgrading to version 2025.4.2 – Empty PDF report when loading XML data

Stimulsoft Reports.JS discussion
manuel.leonor
Posts: 7
Joined: Tue Aug 22, 2023 10:19 pm

Issue after upgrading to version 2025.4.2 – Empty PDF report when loading XML data

Post by manuel.leonor »

Hi team,

I’m currently updating my Stimulsoft environment to the latest version 2025.4.2.
My previous project version was 2023.1.5, and after upgrading, the report generation stopped working.

I have a function that generates a PDF report using XML data, but now the generated report appears completely empty.

Here’s my current code:

Code: Select all

const DownloadReport = async () => {
  const Stimulsoft = window.Stimulsoft
  const report = new Stimulsoft.Report.StiReport();

  const xmlData = await fetch(XML).then(res => res.text());
  const template = await fetch(REPORT_STI).then(res => res.text());

  report.load(template);

  // Load XML data
  const blob = new Blob([xmlData], { type: 'text/xml' });
  const url = URL.createObjectURL(blob);
  const dbCFDi = report.dictionary.databases.getByName("CFDi");
  dbCFDi.pathSchema = "";
  dbCFDi.pathData = url;

  // Report variables
  let variable = report.dictionary.variables.getByName('OriginalString');
  if (variable)
    variable.value = "ORIGINAL STRING EXAMPLE";

  variable = report.dictionary.variables.getByName('OriginalStringSAT');
  if (variable)
    variable.value = "ORIGINAL STRING SAT EXAMPLE";

  report.renderAsync(() => {
    // Export report to PDF
    report.exportDocumentAsync((pdfData) => {
      const fileName = `REPORTE.pdf`;
      Stimulsoft.System.StiObject.saveAs(pdfData, fileName, 'application/pdf');
    }, Stimulsoft.Report.StiExportFormat.Pdf);
  });
};

I’m sending this example using Vite, just to illustrate the issue.
Both the XML and the report template (.mrt) are fetched from APIs, not local files.

I’ve already checked the official documentation and tried several approaches, but haven’t been able to solve the problem.
It seems that some of the functions or data-loading methods might be deprecated or changed in the latest version.

Could you please help me identify what’s changed or how I should correctly load XML data in version 2025.4.2?

Thank you in advance for your help!

Best regards,
Manuel Leonor

download/file.php?mode=view&id=31005
Attachments
Captura de pantalla 2025-10-31 195058.png
Captura de pantalla 2025-10-31 195058.png (140.42 KiB) Viewed 1708 times
stireport-xml.zip
(9.9 MiB) Downloaded 37 times
Max Shamanov
Posts: 1066
Joined: Tue Sep 07, 2021 10:11 am

Re: Issue after upgrading to version 2025.4.2 – Empty PDF report when loading XML data

Post by Max Shamanov »

Hello,

We need some additional time to investigate the issue, we will let you know about the result as soon as possible.

Thank you.
#18710
Max Shamanov
Posts: 1066
Joined: Tue Sep 07, 2021 10:11 am

Re: Issue after upgrading to version 2025.4.2 – Empty PDF report when loading XML data

Post by Max Shamanov »

Hello,

There were versions of the designer where namespaces were parsed incorrectly in XML.
This may cause problems. We recommend that you try recreating (updating) the Dictionary
and correcting the errors in the report template.

Thank you.
manuel.leonor
Posts: 7
Joined: Tue Aug 22, 2023 10:19 pm

Re: Issue after upgrading to version 2025.4.2 – Empty PDF report when loading XML data

Post by manuel.leonor »

Hello,

we are recreating the report in the Stimulussoft Web designer, and there we can replicate and view the XML information. However, when we transfer it to the project, it doesn't display correctly, as shown in the test project. We tried two methods, either using regData or loading the blob, and neither works. Could you give us a hint as to what you mean by the spaces, or if this can be corrected directly in the .mrt(json) file?
Captura de pantalla 2025-11-05 132958.png
Captura de pantalla 2025-11-05 132958.png (112.78 KiB) Viewed 1294 times
Are they referring to the @ symbol that comes before the namespace?
Captura de pantalla 2025-11-05 133530.png
Captura de pantalla 2025-11-05 133530.png (30.9 KiB) Viewed 1294 times
Thank you in advance for your help!

Best regards,
Attachments
CFDI Factura v2.mrt
(108.37 KiB) Downloaded 29 times
Max Shamanov
Posts: 1066
Joined: Tue Sep 07, 2021 10:11 am

Re: Issue after upgrading to version 2025.4.2 – Empty PDF report when loading XML data

Post by Max Shamanov »

Hello,

We need some additional time to investigate the issue, we will let you know about the result as soon as possible.

Thank you
manuel.leonor
Posts: 7
Joined: Tue Aug 22, 2023 10:19 pm

Re: Issue after upgrading to version 2025.4.2 – Empty PDF report when loading XML data

Post by manuel.leonor »

Hi everyone, is there any news on this issue?
Max Shamanov
Posts: 1066
Joined: Tue Sep 07, 2021 10:11 am

Re: Issue after upgrading to version 2025.4.2 – Empty PDF report when loading XML data

Post by Max Shamanov »

Hello.​​

We are still working on the issue.
We will let you know when we get any result.

Thank you.
manuel.leonor
Posts: 7
Joined: Tue Aug 22, 2023 10:19 pm

Re: Issue after upgrading to version 2025.4.2 – Empty PDF report when loading XML data

Post by manuel.leonor »

Hi everyone, is there any news on this issue?
Max Shamanov
Posts: 1066
Joined: Tue Sep 07, 2021 10:11 am

Re: Issue after upgrading to version 2025.4.2 – Empty PDF report when loading XML data

Post by Max Shamanov »

Hello, Jake.

We have identified the issue and need some time to improve it.
We will notify you as soon as we have the results.

Thank you.
manuel.leonor
Posts: 7
Joined: Tue Aug 22, 2023 10:19 pm

Re: Issue after upgrading to version 2025.4.2 – Empty PDF report when loading XML data

Post by manuel.leonor »

Excellent news! We look forward to the solution.
Post Reply