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!

Suppressing Subreport based on returned value

Status
Not open for further replies.

dreman

Programmer
Jan 16, 2002
272
US
Using CR 8.5
using main report via SQL,
using subreport via ACCESS.

Subject: Main report sql table looks at the subreport Access table. If item matches subreport returns a value of 1 else 0. Everything is working ok.
The layout of the report is as follows
CR 8.5
Detail a: subreport
DEtail b: var_returned (from subreport)

Based on var_returned, if =1 detail b section is suppressed. Got that part fine.
How can I make Detail a suppressed as well. Subreport needs to be shown at all time to execute command.
Please advise.
Thank you.
Dré
 
the fact of life is that you cannot suppress the section in the main report that contains the subreport...in this case Detail A.

I assume that the value that you are returning is via shared variable.

My solution for this is to:

1. in the subreport suppress all the sections of the report (the value will still calculate)

2. In the format editor of the subreport field in the main report....remove all borders....then conditionally color the background red using the formula

if 1 = 1 then crRed else crNoColor

this is done since we are going to make the subreport very thin...and we want to be able to find it months from now...trust me this is a BIG time saver.

3. Now make the subreport as thin as possible...right click on the field and use Object Position to make it less than a grid snap.

4. now...tighten up the border so the section is just a hairline....in the section expert you can enable the "Underlay subsequent sections" as well

now your subreport should virtually disappear leaving perhaps a trace line which I generally use as line spacing for the section following. Jim Broadbent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top