This is a migrated thread and some comments may be shown as answers.

Getting page count from subreports

1 Answer 473 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Gary Klesczewski
Top achievements
Rank 1
Gary Klesczewski asked on 21 Mar 2012, 10:13 PM
Hi,

I have a report that I am converting from Crystal that has a need to determine the page numbers for a subreport, which then get passed to another subreport.
What I do today is determine the number of pages of the details and calculate the start page and populate some text that reads "See pages 2 to 5" for example of the 5 pages.
I then pass that from the master report to the first subreport as a parameter to add to a text box.

Any ideas, suggestions on this one?

Thank you!

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 26 Mar 2012, 02:56 PM
Hi Gary,

The built-in PageNumber and PageCount objects can be used only in page sections (see Understanding Report Sections) and page sections of SubReports are ignored as only the page sections of the main report are visible. The PageCount is determined Using PageCount by an extra paging pass after the report has been rendered, so it is known after the report data has been processed.

The only way to keep track of PageCount and PageNumber for several reports and have them in a single document is by utilizing the Report Book functionality.

Regards,
Steve
the Telerik team
NEW in Q1'12: Telerik Report Designer (Beta) for ad-hoc report creation. Download as part of Telerik Reporting Q1 2012. For questions and feedback, use the new Telerik Report Designer Forum.
Tags
General Discussions
Asked by
Gary Klesczewski
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or