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

Null reference with PageCount and PageNumber in header

3 Answers 117 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Taylor
Top achievements
Rank 1
Taylor asked on 09 Dec 2011, 12:41 AM
We recently updated to 5.3.11.1116.  In a large report, we have both a page header and a page footer, and each has a normal 
'Page ' + PageNumber + ' of ' + PageCount
setting.  The footer still works fine, but the header throws a null reference exception.

My next step was going to be to reproduce this in code, so I could step through (the 1-line message where the report should be was little help, as it just said some object was not set). Everything I read about how to set page numbers online tells me that I can only do it in footers and headers (which is where I want), and there are a few discussions about the BeginRenderPage event, which I can no longer find.

So, 2 questions:
1) Any idea how PageCount and PageNumber could be unset in a PageHeader section?  This code has not changed since we upgraded from Q1 2010, but now it does not work.
2) What event should I use to use PageCount and PageNumber fields to set my textbox?

Thanks!

3 Answers, 1 is accepted

Sort by
0
Accepted
Peter
Telerik team
answered on 09 Dec 2011, 09:40 AM
Hi Brandon Beam,

This problem has been fixed in the latest internal build, so you can download it from your account and upgrade to resolve the issue. See release notes here. Sorry for the temporary inconvenience.

Generally The PageCount and PageNumber are global objects and you can use them in expressions. Our suggestion is to avoid events and instead set up the page header/footer expressions to the report definition. You may find useful the Report Life Cycle help article.

All the best,
Peter
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

0
Lane
Top achievements
Rank 1
answered on 20 Jan 2012, 08:09 PM
Can you let me know when there will be a stable build with this fix?  Thanks.
0
Elian
Telerik team
answered on 21 Jan 2012, 09:16 AM
Hi Lane,

Q3 2011 SP1 version is already released and available for download in your account.

All the best,
Elian
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

Tags
General Discussions
Asked by
Taylor
Top achievements
Rank 1
Answers by
Peter
Telerik team
Lane
Top achievements
Rank 1
Elian
Telerik team
Share this question
or