Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suppressing pageheader to use group header in subreport 1

Status
Not open for further replies.

crystaldev1

Programmer
Nov 6, 2003
232
US
Hello, I'm using CR 11 and sql server 2008. This should be a simple fix but just can't get it to work correctly. I have a main report with pageheader. I also have two subreports with its own pageheader. So what I'm trying to accomplish is to suppress pageheader from the main report once the subreport is reached. In subreports, I have the pageheader in the groupheader and set it to repeat for every page. I have the sections as follows:

Main Report:

RH
PH
GH1
GH2
D
GF1
GF2
RFa
RFb (Contains subreport1)
RFc (Contains subreport2)


Thanks.

 
Do you have page breaks set for certain main report sections?

Should the page header show for RH_a?

-LB
 
Yes, I do have "New Page Before" page breaks for RFb and RFc.

I do not have RHa, just RH. And I need to show the page header for the first page which contains RH.


 
Sorry, I meant to say RF_a--should the page header appear on that page?

-LB
 
Yes, the page header should appear upto RFa section. Thanks.
 
Then create these formulas in the field explorer->formula->new and place them in the designated sections and suppress them:

//{@false} to be placed in the Report Header:
whileprintingrecords;
booleanvar flag := false;

//{@true} to be placed in the Report Footer_b:
whileprintingrecords;
booleanvar flag := true;

Then go into the section expert->page header->suppress->x+2 and enter:

whileprintingrecords;
booleanvar flag;
flag = true; //note no colon

-LB
 
Worked just fine!

I tried this method earlier but I placed the @true formula in RFa instead of RFb. I thought the formula would have to be processed first before showing the subreport.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top