How to suppress page footer for only sub report in

2019-08-09 10:30发布

问题:

I need suppress the page footer for only my sub report. I tried a lot but unable find the solution. Please suggest

回答1:

Okay this might be tricky to explain but there is a way to do this and I will add steps to follow.

Basically what you are doing as adding a flag that is set to true every time the sub report is displayed and set to false at the top of a new page.

Step 1.

Add a new formula to the main report called SubRepDisplayed

Step 2.

Set the formula to:

WhilePrintingRecords;
Shared booleanvar subrep;
subrep;

Step 3.

Add another new formula called ResetSubRep

Step 4.

Set this formula to:

WhilePrintingRecords;
Shared booleanvar subrep;
subrep := false;

Step 5.

Now in the sub report add a new formula called SubReportDisplayed

Step 6.

Set this sub report formula to:

WhilePrintingRecords;
Shared booleanvar subrep;
subrep := true;

Step 7.

Add the formula ResetSubRep to the page header, it can be suppressed.

Step 8.

In the sub report add the formula SubReportDisplayed to any visible section, if possible a report header/footer.

Step 9.

Finally in the main report again, in the section expert, select the page footer you want to suppress:

and in the suppression formula enter:

WhilePrintingRecords;
Shared booleanvar subrep;
subrep;

If you've followed all the steps, the sub report being displayed on a page should suppress the page footer with that formula in.