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

Data fields in PageHeader and/or PageFooter

4 Answers 663 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Nicola Farina
Top achievements
Rank 2
Nicola Farina asked on 20 Jun 2014, 01:41 PM
Hi all,

I read a lot of threads and documentation around the web, but I can't understand the point.

I have a report bounded to a dataset of many records; each record is rendered in a report page, but having several subreports, a single record report spans between several pages.

I need to have a field of the record in the header/footer section, so users can see of how many pages is a record composed.

I know that PageHeader and PageFooter can't use Fields expressions, but I suppose that this is a very common request.

Any hints?

Thank you.

4 Answers, 1 is accepted

Sort by
0
Hinata
Top achievements
Rank 1
answered on 25 Jun 2014, 07:10 AM
Hi Nicola,

This is the closest solution I could find. You might be able to adapt it to your case:
http://blogs.telerik.com/telerikreportingteam/posts/12-02-07/reset-pagenumber-per-report-group.aspx

Also note that you can use the PageExec function in the Page Header/Footer sections to get the required field information:
http://www.telerik.com/help/reporting/expressions-data-functions.html
0
Nicola Farina
Top achievements
Rank 2
answered on 25 Jun 2014, 10:21 AM
Thanks for your suggestion,

but in my project it doesn't work, because it says that "Fields.xxxxxx" cannot be found in scope.

I suppose that could be caused by having not a datasource declared at design time, but programmatically at runtime.
0
Nicola Farina
Top achievements
Rank 2
answered on 25 Jun 2014, 10:44 AM
Seems it works if I refer not to "detail" but to a textbox of whose value is set to the datafield, but the value is printed only on the first page of each record (I suppose because the textbox is not present in the next pages anymore).
0
Stef
Telerik team
answered on 30 Jun 2014, 09:02 AM
Hi Nicola,

The PageExec function will calculate the given expression in the set scope (in the example this is the data scope of the Detail section) per page. In addition, please note there is a PageBreak setting on the group header, which will additionally place new group on a new page.

Without assigned data the design-time preview will fail. Thus our suggestion is to assign test data at design-time, which will be overwritten at run-time, when you supply the actual data for the report.

If you need further help, please open a support ticket and send us a small runnable demo project that illustrates your settings and the problem.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
Nicola Farina
Top achievements
Rank 2
Answers by
Hinata
Top achievements
Rank 1
Nicola Farina
Top achievements
Rank 2
Stef
Telerik team
Share this question
or