July 13, 2012 at 3:33 am
hi folks,
i have a requirement through which i need to show the pages total. and for that i want to access global parameter page number, how to achieve it.
i have tried few things in google but not working
some of them are
1. in the expression i have used ="Page " + Globals!PageNumber.ToString() + " of " + Globals!TotalPages.ToString()
but no success, please help me to achieve this.
thanks
July 13, 2012 at 3:39 am
ToString() is not a valid method for the variables, if you want to convert it to a string use CStr
=CStr(Globals!PageNumber)
July 13, 2012 at 4:19 am
Thanks for your reply, by using this also i am not getting the desired result its throwing error.
i used this
="Page " + CStr(Globals!PageNumber) + " of " + CStr(Globals!TotalPages)
it is saying that we can't use global variables with report body as it can be use in report header or footer only.
is there any way to use it in report body ??
Error2[rsPageNumberInBody] The Value expression for the textrun ‘Textbox228.Paragraphs[0].TextRuns[0]’ refers to the global variable PageNumber or TotalPages. These global variables can be used only in the page header and page footer.D:\WORK\UAT\ReportXL\RiverbedReportsUpdated\RiverbedReports\RiverbedReports\QuoteReport_Dev.rdl00
July 13, 2012 at 4:32 am
Either add a report header or footer, or create user parameters and assign them the values as an expression, I have personally not done the user params so cannot confirm if they will work.
July 21, 2012 at 3:19 pm
Build In variables like Page Number and Total Pages does not work in Report Body, as they are property of Page Footer and Header.
One more reason because the body of the report is executed first then the page footer or header.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply