Skip to Content
0
Former Member
Apr 09, 2009 at 09:01 AM

changing pageheader

14 Views

Hi, I have a subreport I use for pageheader on many reports.

It's made up of a number of detailsections of which some have to be suppressed, I use a boolean for this.

On the actual report I have a group per user. The pageheader(subreport) has to be fully displaid for the first page of the user, any pages after that, the subreport has to suppress some sections.

For the next user in the group it has to be the full header again, any pages after that suppress again.

What I have tried is using 3 formulas.

In the ReportHeader section I placed this formula (@flagInit)

WhilePrintingRecords;
booleanVar showHeader:=true;

In the GroupHeaderSection I placed this formula (@trueFlag)

WhilePrintingRecords;
booleanVar showHeader:=true;

In the groupFootersection I placed this formula (@falseFlag)

WhilePrintingRecords;
booleanVar showHeader;
showHeader:= not showHeader;

depending on the @falseFlag I suppress the sections in the subreport

This just seems to switch the header every other page, and not per user.

Any suggestion of solving this problem?

Any help is welcome.

-edit -

Ok, now I feel really stupid.

I solved it with just 1 formula.

WhilePrintingRecords;
if not InRepeatedGroupHeader then true else false

the formula is passed to the subreport using a parameter field, where it suppresses the necessary sections.

(the 'Repeat Group Header On each Page" is enabled in the Group expert)

Simple 😉

Edited by: Bruno Latte on Apr 9, 2009 11:17 AM