I want to use Stimulsoft Reports.JS2.1 and Stimulsoft Reports.JS4.2 In my protject
When I use Stimulsoft4.2 will be fine, but use Stimulsoft2.1 have somthing wrong
Code: Select all
constructor(private http: HttpClientModule) {
let script1 = document.createElement('script');
script1.type = 'text/javascript';
script1.src = 'stimulsoft.js';
let script2 = document.createElement('script');
script2.type = 'text/javascript';
script2.src = 'stimulsoft_old.js';
document.getElementsByTagName('head')[0].appendChild(script1);
script1.onload = () => {
console.log('run')
this.options = new Stimulsoft.Viewer.StiViewerOptions();
this.viewer = new Stimulsoft.Viewer.StiViewer(this.options, 'StiViewer', false);
console.log(this.options)
var report = Stimulsoft.Report.StiReport.createNewReport();
report.loadFile("assets/report/travis/test1028_2.mrt");
// report.regData();
var data = new Stimulsoft.System.Data.DataSet();
data.readJsonFile("assets/report/測試資料(2).json");
report.regData("測試資料(2)", null, data);
this.viewer.report = report;
this.viewer.renderHtml("testrpt");
};
}
Code: Select all
"scripts": [
{
"input": "src/assets/stimulsoft/stimulsoft.dashboards.js",
"inject": false,
"bundleName": "stimulsoft"
},
{
"input": "src/assets/stimulsoft/stimulsoft.reports.js",
"inject": false,
"bundleName": "stimulsoft"
},
{
"input": "src/assets/stimulsoft/stimulsoft.reports.maps.js",
"inject": false,
"bundleName": "stimulsoft"
},
{
"input": "src/assets/stimulsoft/stimulsoft.viewer.js",
"inject": false,
"bundleName": "stimulsoft"
},
{
"input": "src/assets/stimulsoft_old/stimulsoft.dashboards.js",
"inject": false,
"bundleName": "stimulsoft_old"
},
{
"input": "src/assets/stimulsoft_old/stimulsoft.reports.js",
"inject": false,
"bundleName": "stimulsoft_old"
},
{
"input": "src/assets/stimulsoft_old/stimulsoft.reports.maps.js",
"inject": false,
"bundleName": "stimulsoft_old"
},
{
"input": "src/assets/stimulsoft_old/stimulsoft.viewer.js",
"inject": false,
"bundleName": "stimulsoft_old"
}
]
Thanks!