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

Suppress Subreport on Condition 1

Status
Not open for further replies.

cfire

Technical User
Jul 26, 2004
4
US
I've placed the subreport in the report footer section. It prints everytime the report is run. New requirements specify that the subreport be printed only if a field contains a certain value.

I am running the report based on a SQL view, I've included the field in the view.

If there are 100 records that specify to print the subreport, the subreport need to be printed only once. If there are no records that specify to print the subreport then I would like it suppressed.

Can someone please assist me in finding a solution, I tried a few ideas that did not work.

Thanx in advance
 
I am using version 8.5, thanx again
 
In the main report, create a formula {@value}:

if {table.field} = "YourValue" then 1 else 0

Then right click on the subreport ->format subreport->common->suppress->x+2 and enter:

sum({@value}) = 0

This will suppress the subreport if there no instances of the value in your report.

-LB
 
Thanx LB, I will give it a try. I will let you know how it turns out. I really do appreciate your response.

CFire
 
LB, You rock...it worked like a charm. I just tok it a step further based on information I read in this forum, I suppressed the entire section using your formula so that I didn't get the blank page when the condition wasn't met. Awesome. Thank you so much.

CFire
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top