Two version in one project

Stimulsoft Reports.JS discussion
Post Reply
_n_il__
Posts: 5
Joined: Thu Nov 11, 2021 5:59 am

Two version in one project

Post by _n_il__ »

Hello, I'm new here and I need some help.

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");
    };

  }
And this is my angular.json

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"
              }
            ]
If you can help me, I'll appreciate.
Thanks!
Attachments
rr.png
rr.png (6 KiB) Viewed 601 times
test.png
test.png (24.56 KiB) Viewed 603 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Two version in one project

Post by HighAley »

Hello,

It's impossible to use different versions of our tool the same time.
Please, use the latest build.

Thank you.
_n_il__
Posts: 5
Joined: Thu Nov 11, 2021 5:59 am

Re: Two version in one project

Post by _n_il__ »

HighAley wrote: Fri Nov 12, 2021 6:47 am Hello,

It's impossible to use different versions of our tool the same time.
Please, use the latest build.

Thank you.

Thanks for your reply
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: Two version in one project

Post by Lech Kulikowski »

Hello,

You are welcome.
Post Reply