Desktop Report TotalPages not displayed

Hello Everyone,

The report editor has been introduced around 2009, and I can’t seem to get TotalPages to work. How do I get the total number of pages to have a format like “Page X of Y” on each page?

This question has been asked before and I am curious for an update.

The correct total number of pages can be retrieved with the following code:

System.DebugLog "p:" + TotalPages.ToString

The problem is that the TotalPages value can’t seem to be added to each page. Does anyone have some helpful thoughts?

Unfortunately the report engine doesn’t know until the end because it doesn’t do the math about row heights until each row is drawn.

Now, you know the height of each header and footer section and what data is being drawn, you could do a pre-print pass and calculate what the last page is going to be yourself.

Thanks for the comment Greg.

I went through a few code trials and ran into crashes. The crashes have been submitted in Issues. After working on this problem for a few days, I am going to leave it alone - just not enough time for it.

Warm regards.

Edit: Just checked and Landscape configuration has also stopped working in API2.