I'm working with Crystal Reports 8.5. I have a complex report with 5 subreports which may span multiple pages. I'd like to continue the page numbering that the main report controls. I have two page headers in the main report, they share a common variable for page numbering:
//@PageNumber
WhilePrintingRecords;
Shared NumberVar PageNum := PageNum + 1;
I also have the following placed at the main report header:
//@SetPageNumber
WhilePrintingRecords;
Shared NumberVar PageNum := 0
The page numbering seems to work fine up until the subreports span more than one page long. Then the page number simply repeats in the subreport section. If I place another formula in the subreport report header:
//@PageNumber2
WhilePrintingRecords;
Shared NumberVar PageNum := PageNum + 1;
The incorrect page number is shown in the main report page header but correctly when access @PageNumber2 in the subreport. (This case is true only if the subreport is exactly two pages long.) I realize that it is the order in which Crystal evaluates the formulas which is critical.
Is there a way for the subreport to tell the main report it spans x amount of pages?
Any suggestions on how to get the paging to work correctly for single or multiple page subreports?
Appreciate any help!
//@PageNumber
WhilePrintingRecords;
Shared NumberVar PageNum := PageNum + 1;
I also have the following placed at the main report header:
//@SetPageNumber
WhilePrintingRecords;
Shared NumberVar PageNum := 0
The page numbering seems to work fine up until the subreports span more than one page long. Then the page number simply repeats in the subreport section. If I place another formula in the subreport report header:
//@PageNumber2
WhilePrintingRecords;
Shared NumberVar PageNum := PageNum + 1;
The incorrect page number is shown in the main report page header but correctly when access @PageNumber2 in the subreport. (This case is true only if the subreport is exactly two pages long.) I realize that it is the order in which Crystal evaluates the formulas which is critical.
Is there a way for the subreport to tell the main report it spans x amount of pages?
Any suggestions on how to get the paging to work correctly for single or multiple page subreports?
Appreciate any help!