Page 1 of 1

Two datasource in one report

Posted: Thu Oct 24, 2019 9:48 am
by Cheryabushkin
Hello!

Tell me please, how can I add two datasources or more in one report?

I try this

Code: Select all

	const myProductType = '/url1';
	const myMilitary = '/url2';

	designer.onCreateReport = function (args) {
		var dataSet1 = new Stimulsoft.System.Data.DataSet("DataSources");
                var dataSet2 = new Stimulsoft.System.Data.DataSet("DataSources");
                dataSet1.readJsonFile(myProductType);
                dataSet2.readJsonFile(myMilitary);
                args.report.regData('DataSources', "", dataSet1);
                args.report.regData('DataSources', "", dataSet2);

                args.report.dictionary.SynchronizeBusinessObjects;
                args.report.dictionary.synchronize(3);	
        }	
but it's not work.

Can anybody help me?

Re: Two datasource in one report

Posted: Mon Oct 28, 2019 9:17 am
by Lech Kulikowski
Hello,

Please set the different names for your datasets.

Thank you.