Page 1 of 1

Two version in one project

Posted: Thu Nov 11, 2021 6:21 am
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!

Re: Two version in one project

Posted: Fri Nov 12, 2021 6:47 am
by HighAley
Hello,

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

Thank you.

Re: Two version in one project

Posted: Fri Nov 12, 2021 8:19 am
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

Re: Two version in one project

Posted: Fri Nov 12, 2021 11:05 am
by Lech Kulikowski
Hello,

You are welcome.