How to pass multiple tables

Stimulsoft Reports.NET discussion
Post Reply
tig
Posts: 3
Joined: Wed Mar 31, 2021 7:39 am

How to pass multiple tables

Post by tig »

When I only pass one table,code like this:

Code: Select all

StiReport report = new StiReport();
            report.Load("file.mrt");
            report.RenderedPages.Clear();
            report.RegData(table);
            report.Render();
            report.Print();
But when I want to pass two tables,how to write the code?
I've tried two ways:
1.

Code: Select all

StiReport report = new StiReport();
            report.Load("file.mrt");
            report.RenderedPages.Clear();
            report.RegData(table);
            report.Render();
            report.RegData(table1);
            report.Render();
            report.Print();
2.

Code: Select all

StiReport report = new StiReport();
            report.Load("file.mrt");
            report.RenderedPages.Clear();
            report.RegData(dataset);
            report.Render();
            report.Print();
But when I used the first way,only one of the two tables has data.
When I used then second way,there is no data.
What shall I do? Are there any more detailed official API documents or examples?
Lech Kulikowski
Posts: 6199
Joined: Tue Mar 20, 2018 5:34 am

Re: How to pass multiple tables

Post by Lech Kulikowski »

Hello,

Please check

Code: Select all

...
report.RegData(table);
report.RegData(table1);
report.Dictionary.Sunchronize();
report.Render();
if the issue still present, please send us a sample project for analysis.

Thank you.
Post Reply