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

PageNumber wrong when exporting PDF if used in expression

1 Answer 50 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Rob
Top achievements
Rank 1
Rob asked on 24 Feb 2014, 07:41 PM

We are using the HTML5 report viewer (7.2.14.127). To provide localization we are passing all text to used defined functions. In the footer of our reports we have the normal "Page X of Y" text. 

In visual studio preview we see the proper page numbers on each page and if from Visual Studio preview I save to PDF the pdf file has the proper page numbering.

However when deployed and used through the HTML5 viewer and exporting to PDF every page has the same page number which is equal to the page count (e.g. "Page 5 of 5" on all 5 pages).

In our report the expression looks like this:

= ReportsLibrary.Localization.GetText("en_us", "pagenumbers", PageNumber, PageCount)

Which resolves down to this code:
string.Format("Page {0} of {1}", pageNumber, pageCount);

Is this a bug or am I missing something?






string.Format("Page {0} of {1}, PageNumber, PageCount)

1 Answer, 1 is accepted

Sort by
0
Rob
Top achievements
Rank 1
answered on 24 Feb 2014, 09:05 PM
Nevermind. Thankfully found error in our localization code that only affected one culture. Of course it was the one we defaulted to for our multipage report test.
Tags
General Discussions
Asked by
Rob
Top achievements
Rank 1
Answers by
Rob
Top achievements
Rank 1
Share this question
or