Register more than one datasource

Stimulsoft Reports.WEB discussion
Post Reply
ecpmiranda
Posts: 52
Joined: Sun Jun 05, 2016 9:35 pm

Register more than one datasource

Post by ecpmiranda »

How can I register more than one datasource?

Most of may reports has one datasource and I use the next statement

Code: Select all

                report.RegData("DataSet1", dataSource1);
Now I need to register two datasources like this

Code: Select all

                report.RegData("DataSet1", dataSource1);
                report.RegData("DataSet2", dataSource2);
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Register more than one datasource

Post by Alex K. »

Hello,

Can you please describe your issue in more details. What is wrong with this code?

Code: Select all

report.RegData("DataSet1", dataSource1);
report.RegData("DataSet2", dataSource2);
Thank you.
ecpmiranda
Posts: 52
Joined: Sun Jun 05, 2016 9:35 pm

Re: Register more than one datasource

Post by ecpmiranda »

The DataSet1 is master anda DataSet2 is detail. When I register the two datasets, the report displays a blank page.
When I register only master the report works fine but without data for detail.
The report has a subreport to display detail data.
In the dictionary I put the two datasources like the image attached.
Attachments
DataSources.jpg
DataSources.jpg (24.56 KiB) Viewed 2756 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Register more than one datasource

Post by HighAley »

Hello.

Please, set the Cache All Data property of the report to True.
If this does not help we need to see your project.

Thank you.
ecpmiranda
Posts: 52
Joined: Sun Jun 05, 2016 9:35 pm

Re: Register more than one datasource

Post by ecpmiranda »

I found a solution! Made some modifications on my classes! Thank you!
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Register more than one datasource

Post by HighAley »

Hello.

Great!
Let us know if you need our help.

Thank you.
Post Reply