Page 1 of 1
number of subreports rendered pages
Posted: Thu Nov 20, 2008 5:24 am
by Albatros
How can i get number of subreports pages.
Here i my code:
StiReport report = new StiReport();
report.SubReports.Add(report1);
report.SubReports.Add(report2);
report.Render(true);
I need count renderedPages from report2 in report.
Thank you.
number of subreports rendered pages
Posted: Fri Nov 21, 2008 9:31 pm
by Edward
Hi, Albatros.
In which place do you need this information? Do you plan to receive it in Designer or in application?
Which report engine are you using? I mean EngineV1 or EngineV2 and the date of the build.
Thank you.
number of subreports rendered pages
Posted: Mon Nov 24, 2008 2:41 am
by Albatros
Hi,
I plan to update a text object in report1 after render whole report.
I need to put a number of rendered pages of report2 in report1 page.
I use Engine V1 because I have problems with engine V2 and subreports.
Do you have any code for that.
Thanx.
number of subreports rendered pages
Posted: Fri Nov 28, 2008 12:03 pm
by Vital
Hello,
Albatros wrote:How can i get number of subreports pages.
Here i my code:
StiReport report = new StiReport();
report.SubReports.Add(report1);
report.SubReports.Add(report2);
report.Render(true);
I need count renderedPages from report2 in report.
Thank you.
You can use following code:
Code: Select all
report1.Render(false);
int pagesCount = report1.RenderedPages.Count;
StiReport report = new StiReport();
report.SubReports.Add(report1);
report.SubReports.Add(report2);
report.Render(true);
pagesCount = report.RenderedPages.Count - pagesCount;
Thank you.
number of subreports rendered pages
Posted: Tue Dec 23, 2008 1:25 am
by Albatros
Vital wrote:Hello,
You can use following code:
Code: Select all
report1.Render(false);
int pagesCount = report1.RenderedPages.Count;
StiReport report = new StiReport();
report.SubReports.Add(report1);
report.SubReports.Add(report2);
report.Render(true);
pagesCount = report.RenderedPages.Count - pagesCount;
Thank you.
But this means double rendering and need more time.
Is there any other direct solution.
number of subreports rendered pages
Posted: Tue Dec 23, 2008 3:07 am
by Edward
Hi Albatros,
It is impossible to know number of pages in the subreport without rendering of the subreport. That is why double rendering is required.
Thank you.