Page 1 of 1

How to pass multiple tables

Posted: Fri Apr 16, 2021 5:21 am
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?

Re: How to pass multiple tables

Posted: Fri Apr 16, 2021 1:10 pm
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.