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!

Suppress main report on suppressed subreport

Status
Not open for further replies.

kpetree10

IS-IT--Management
Jun 15, 2007
57
US
Here's my issue, I have a subreport that has the "Suppress Blank Subreport" option checked, which works, however if the subreport is suppressed how can I make it suppress the main record that holds the subreport?
 
In section expert check suppress blank section.
This only works as long as you do not have borders onthe SR.

Ian
 
Unfortunately that doesn't work because I have some other information in the record that is not part of the sub-report.
 
In what report section is the subreport located? If you insert a section above it (which can be suppressed), e.g., detail_a, you can place a formula like this in it, where x is the value currently displayed by the sub in the main report:

whileprintingrecords;
shared numbervar x := 0;

In the subreport report footer, add a formula like this:
whileprintingrecords;
shared numbervar x := maximum({table.ID}); //value to display

In the main report, with the sub in detail_b, move your other fields to detail_c, which you can then suppress by using a formula like this:

whileprintingrecords;
shared numbervar x;
x = 0 //note no colon

You can format detail_b to "suppress blank section", and then display the subreport value in detail_c by using:

whileprintingrecords;
shared numbervar x;

-LB
 
I have tried using that shared numbervar command before but it always tells me that a boolean is required here. I typed it just as you did. Am I putting it in the wrong place?
 
Disregard my last post, I wasn't thinking right...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top