Exported Pdf is empty
Posted: Thu Apr 09, 2020 9:30 pm
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.
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.