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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove main header from printing when subreport is printing 2

Status
Not open for further replies.

taterday

Programmer
Jan 28, 2009
183
US
The main and subreport prints multi pages. When the main report group breaks and links to the sub report. I have the report headers for the subreport printing like I want. Above this printing is the main report headers. I do not want the main report headers to print on the page with the subreport.

Same page:
Main report heading && I want this not to print
Subreport heading
group details



I know there has to be a way.

Please help. Thank you,

 
You should identify the report sections with their exact names. I'm assuming you are referring to a page header section.

In the main report, create two formulas:

//{@true}:
whileprintingrecords;
booleanvar flag := true;

//{@false}:
whileprintingrecords;
booleanvar flag := false;

Place {@true} in the main report section that contains the subreport. Place {@false} in a section after the subreport (if the sub is in GH1a, place the {@false} formula in an inserted GH1b section. These formulas can be suppressed as can GH1b. Then go into the section expert->page header->suppress->x+2 and enter:

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

-LB
 
Sorry. Thank you for helping me on the right track.

Main report
GF1b Sub report 1 && insert the true, suppressed the var
GF1c Sub report 2 && insert the true, suppressed the var
Added GF1d for the false && insert the false, suppressed the section

In the section expert for GF1b
page header->suppress->x+2 added the code

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

In the section expert for GF1c
page header->suppress->x+2 added the code

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

Still getting PH from main report. I know it my lack of experience. Please explain my error.

Thank you.


 
You didn't say before that you had two subreports.

You should only be adding the section expert code in the main report for the PAGE HEADER section, NOT a group footer section. So highlight the page header in the section expert->suppress->x+2 and add the code there:

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

-LB
 
It worked.

Thank you so much to the Tip Master.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top