Reputation: 21
I need a suppression formula that shows my page header only on the first page with data (which is not necessarily the first page of the report), and hides it afterward. I'm using a flag to suppress the page header after it's been shown once, so that part shouldn't be any trouble.
The tricky part is counting what's on the page. Sounds simple, but these things don't work:
1) A Running Total, because it's evaluated after the page's records are printed so its count doesn't show up until the next page.
2) A "Count" formula, because it counts every record in the report, not just on the page.
Any ideas?
Upvotes: 0
Views: 1880
Reputation: 21
Think I got it. Might be overly complicated but this is what seems to be working (note I didn't use a count after all).
This goes in an always-suppressed formula in the Details section that, if shown, I want to see the Page Header (but only once, as stated in the question):
whileprintingrecords;
global booleanvar ShowPageHeader := true
Then this goes in the suppression formula for the Page Header:
whileprintingrecords;
global booleanvar PageHeaderAlreadyShown;
global booleanvar ShowPageHeader;
if PageHeaderAlreadyShown then
true
else if ShowPageHeader then
(
PageHeaderAlreadyShown := true;
false
)
else
true
The "PageHeaderAlreadyShown" flag hides the page header after it's been shown once.
Upvotes: 1
Reputation: 2750
Not knowing any of your fields, you would probably be able to use something like:
WhilePrintingRecords;
{table.field} = ""
That should suppress it if a certain field has no data.
Upvotes: 0