My report contains one subreport placed in RFb. The data in the subreport is unrelated to the data in the primary report, so each report requires its own set of column headers. When printed, the subreport requires at least several page. Subreports have no page header section. In my subreport the column headers are placed in the RH section of the subreport, but these headers do not show up after the first page of the subreport. In addition, the headers in the primary report appear in the subreport, though they are inappropriate.
To workaround this problem I placed the primary report headers into PHa and the subreport headers into PHb, both in the Primary report. I want to use conditional formatting (suppression) to control the appearance of these headers WhilePrintingRecords.
The objective is to suppress PHb until the SECOND page of the subreport. (The subreport has a title page, so that MUST be the first section on page 1 of the subreport). PHa is suppressed AFTER the primary report is done. The last section in the primary report is RFa (or is it? See below).
Using Basic syntax I placed the following formula into RFa of the Primary report.
'Determine last page of Primary report.
WhilePrintingRecords
Global nLastPgSec1 As Number
nLastPgSec1 = PageNumber
Formula = nLastPgSec1
However, I have found that the value of nLastPgSec1 increments by one as each page of the subreport is printed. The only way this can occur is if RFa of the primary report is evaluated with each page, even though the subreport is placed in RFb.
I know this is probably difficult to follow without a visual of the design.
Can anyone tell me how to control the conditional formatting to accomplish what I need?
Thanks,
Art