Skip to main content
Solved

PageCount and PageIndex in Subreport

  • 11 December 2023
  • 2 replies
  • 71 views

Hello, can we integrate the PageCount and PageIndex/PageOf variables into a Subreport? We aim to develop a Footer-Subreport for inclusion in all our reports. However, we encounter a challenge where the Page-Count consistently shows as 1 of 1, regardless of the actual number of pages in the report.

So Main Report => Subreport 

 

Inside of the Subreport: = Switch( h@Locale] = 'de-de', 'Seite'+' '+ @PageIndex]+' '+'von'+' '+ @PageCount], TRUE, 'Page'+' '+ @PageIndex]+' '+'of'+' '+ @PageCount] )
 

 

I have been unsuccessful in this.  What I do as a workaround is to use a footer under the sub report.  Set the footer’s ProcessOrder to Always and use this formula:  ='Page ' + gPageIndex] + ' of ' + oPageCount]

 

 

 

 


@jwestermann17 The subreport will not work with paging, this is not the design intention of a subreport, as there are a number of functions which do not work to incorporate in a subreport and expect to see them on the main report. The reason for this is that the subreport is meant to be thought of as just a page in the main report, not quite a full report embedded within another report, so global fields will only work in the main report (or the subreport if it is ran by itself).


Reply