Page 1 of 1

Exported Pdf is empty

Posted: Thu Apr 09, 2020 9:30 pm
by DorsaEslami
Hi.I'm using stimulsoft Designer to create a report and use it in ReactJs .I created a .mrt report using business object and tried to send the data to it by below code(When the user clicks on the "Print" button this code starts running) :
var report = new window.Stimulsoft.Report.StiReport();
report.loadFile("rp_sectionType.mrt");
var dssectionTypeList = new window.Stimulsoft.System.Data.DataSet("sectionTypeList");
//I call an API in ComponentDidMount() and it returns this json data i'm using below.
dssectionTypeList.readJson(this.props.sectionTypeList);
report.regData("sectionTypeList","sectionTypeList",dssectionTypeList);

report.dictionary.synchronize();

report.renderAsync(() => {
report.print();
});

and i added these scripts to my index.html:

<link rel="stylesheet" type="text/css" href="css/stimulsoft.viewer.office2013.whiteblue.css">
<script type="text/javascript" src="scripts/stimulsoft.reports.pack.js"></script>
<script type="text/javascript" src="scripts/stimulsoft.reports.maps.pack.js"></script>

The problem is the exported pdf is a blank page.Could you please help me to know where the problem is?Thanks.

Re: Exported Pdf is empty

Posted: Tue Apr 14, 2020 8:16 am
by Lech Kulikowski
Hello,

Please send us a sample project that reproduces the issue for analysis.

Thank you.

Re: Exported Pdf is empty

Posted: Wed Apr 15, 2020 7:19 am
by DorsaEslami
Hi.
I worked on my project and right now i have this error : "Unexpected token < in JSON at position 0".
I attached my sample project.
thanks.

Re: Exported Pdf is empty

Posted: Fri Apr 17, 2020 9:08 pm
by Lech Kulikowski
Hello,

Please send us your request with a detailed description onĀ support@stimulsoft.com.

Thank you.