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

DataField value in PageHeader problem

1 Answer 188 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
David A.
Top achievements
Rank 1
David A. asked on 02 Aug 2011, 01:38 PM
Hi,
I have a report that is grouped by user that shows a list of their clients.  After each user there is a page break.  At the top of each page it is supposed to print the user name with a line break and then some text.  I cannot for the life of me get this to work as it always prints the first user on every page header.  The users in the sample screenshots are Harry, Larry, and Mary.  To demonstrate, I have put the user name in the address field to show that the grouping is working, but the page header is not.

The code I am using for the textbox in the page header is this:
this.textBox6.Value = "{Fields.UserName}\r\nCLIENT SIGN-IN SHEET";

Any help on this would be greatly appreciated.

1 Answer, 1 is accepted

Sort by
0
Accepted
Peter
Telerik team
answered on 05 Aug 2011, 01:25 PM
Hi David A.,

When you place a databound report item in the page section, it's bound to the entire report data. In order to alter the scope to the current page our suggestion is to use PageExec(itemName, aggregateFunction) which executes the specified aggregate function in the given scope. As the name suggests, it can be used in page header or page footer of the report. Check out the Invoice demo report that demonstrates the PageExec function.

Check out the Understanding Report Sections help article that elaborates further on report sections.

Greetings,
Peter
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Tags
General Discussions
Asked by
David A.
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or