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!

how to suppress sub-report in another sub-report

Status
Not open for further replies.

HRHK

Programmer
Jun 5, 2005
83
US
I got two sub reports Text_PageHeader and FaxCoverLetter in a report.
Text_PageHeader is in Page Header section and FaxCoverLetter is in group Footer section.
FaxCoverLetter will always be in new page.
Currently Text_PageHeader sub-report appears in every page, but I want to suppress
this sub-report from appearing in FaxCoverLetter too. How can I do this?
Any help is much appreciated. Thanks.
 
Right click the group footer section and select insert section below twice.

Move the fax sub into the middle section.

In the first group section create and place a formula in cosnisting of:

whileprintingrecords;
booleanvar SupPH:=true

You can suppress that section now

Now in the formula area for suppress of the page header place:

whileprintingrecords;
booleanvar SupPH

Now in the lowest page footer section create and place this formula:

whileprintingrecords;
booleanvar SupPH:=false

Now whenever the subreport is firing the suppression for the page header will be on.

-k
 
Thanks k as always. It worked out great!!
 
It hides the Text_PageHeader in the fax FaxCoverLetter which is good but I would also like to hide Text_PageHeader in following situation. for eg. if a customer (group by customer and customer_contact) has more than 1 page of report, then the Text_PageHeader re-appears in the next page. I would like the Text_Header to appear only on the first page of every customer report. Another related problem is, on page 2 of customer report, the customer_contact don't show up (somewhere this must have gotten suppressed). I am not sure what's wrong.
 
Where is this customer group, in the main report? you need to be specific, the page header shouldn't show up again until AFTER the subreport is done.

If you mean that the main report needs to suppress page headers as well, this has nothing to do with what we've already done.

You can use the same theory for suppressing the page header for any group.

So turn it off in the group header section (the page header should already have displayed depending upon other settings), and turn it on the the group footer.

And I can't help you with "on page 2 of customer report, the customer_contact don't show up " unless you give some indication of where it is...

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top