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

Using PageCount value in codebehind

2 Answers 212 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Roland
Top achievements
Rank 1
Roland asked on 26 Sep 2012, 11:04 AM
Hello

I am working on a report, where the PageHeader has to have a label (addressee) that can have 4 different values and depends on the current page and total number of pages in the report. 
I have created a method that takes these, but it is not working as anticipated.

I debugged it and the problem is that the PageCount that is passed is not the final at the time of calling the method. Is there a way to access  the total number of pages from code-behind?

Regards,
Roland

2 Answers, 1 is accepted

Sort by
0
Elian
Telerik team
answered on 29 Sep 2012, 03:05 PM
Hello Roland, 

The PageCount and PageNumber can be used with no problem in custom user functions in the Page sections. How exactly do you use them and how the values differ from the expected? 
Please find the attached report showing a simple case of using these object in a user-function.
 
Kind regards,
Elian
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

0
Roland
Top achievements
Rank 1
answered on 03 Oct 2012, 06:54 AM
Thanks for the reply Elian, at the end I figured I couldn't have solved the problem anyway with just PageCount because I needed a ReportBook. But the solution might come handy at some point, so thank you :)
Tags
General Discussions
Asked by
Roland
Top achievements
Rank 1
Answers by
Elian
Telerik team
Roland
Top achievements
Rank 1
Share this question
or