Page 1 of 1

PDF creation successfully but no data.

Posted: Tue Jun 04, 2019 3:42 pm
by ednt
Hi,
I try to create a .pdf from a stiReport.
Static things like background-color works but the data is not included/showing.
Any ideas?
Here my code:

Code: Select all

    const LoadReportFromString = (data) => {
    console.log(data);
    let report = new Stimulsoft.Report.StiReport();
    report.load(data);
    report.render();
    return report;
};


const SaveReportAsPdf = (report) => {
    console.log("Save Report: " + report.reportName);
    //console.log(report);
    // Create an PDF settings instance. You can change export settings.
    var settings = new Stimulsoft.Report.Export.StiPdfExportSettings();
    // Create an PDF service instance.
    var service = new Stimulsoft.Report.Export.StiPdfExportService();

    // Create a MemoryStream object.
    var stream = new Stimulsoft.System.IO.MemoryStream();
    // Export PDF using MemoryStream.
    service.exportTo(report, stream, settings);

    // Get PDF data from MemoryStream object
    var data = stream.toArray();
    // Get report file name
    var fileName = String.isNullOrEmpty(report.reportAlias) ? report.reportName : report.reportAlias;
    // Save data to file
    Object.saveAs(Buffer.from(data), fileName + ".pdf", "application/pdf");
};

Re: PDF creation successfully but no data.

Posted: Wed Jun 05, 2019 12:12 pm
by Lech Kulikowski
Hello,

Please send us a sample report with test data which reproduces the issue for analysis.

Thank you.

Re: PDF creation successfully but no data.

Posted: Thu Jun 06, 2019 7:09 am
by ednt
Thank you for your reply,

I create the test.mrt file with the Stimulsoft C# Designer.
Now I tried to create a .pdf from this file, but from js code.

In the First picture you can see how it should be, in the second you see the result as it is.

For a test I also created a mrt with the JS Designer. With this mrt it was possible to save it as html.
But it also failed to save it as pdf.
I have add the .mrt file as attachment for you, too.

Re: PDF creation successfully but no data.

Posted: Fri Jun 07, 2019 8:06 am
by ednt
We need urgent help !!!

Please !

Re: PDF creation successfully but no data.

Posted: Mon Jun 10, 2019 7:31 am
by Lech Kulikowski
Hello,

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

Thank you.

Re: PDF creation successfully but no data.

Posted: Mon Jun 17, 2019 11:49 am
by ednt
Hello,
We still need help :(

Re: PDF creation successfully but no data.

Posted: Thu Jun 20, 2019 9:06 am
by Lech Kulikowski
Hello,

Sorry for the delay with the response.

We couldn't reproduce the issue on our samples. Please send us a full sample project which reproduces the issue for analysis.

Also, you can check your report on our samples:
https://github.com/stimulsoft/Samples-JS

Thank you.