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!

Suppressing a Sub-report

Status
Not open for further replies.
Jun 17, 2004
50
GB
Hi,

I am relatively new to Crystal and I have a problem trying to suppress a subreport.

The subreport is sat in the detail section of my report. I can suppress the report if they are no records in the sub-report but a gap still remains in the main report.
I would like to be able to suppress the section in the main report based on the count of records in the subreport i.e. if the is only 1 record I want to suppress the section on the main report.

I have tried variables but because the subreport gets processed nearly last i can't suppress a section on the main report based on a count in it.

Any ideas?
 
This is very version dependant. You can only suppress the section in version 9 or later. Prior versions you can only make the section small..

Lisa
 
Au contraire- I use CR 8 & suppress sections and/or subreports all the time.

The easiest way is to open the Report Options for the subreport & check "Suppress printing if no records"- no records, no subreport. Then, in the main report, open the Section Expert, select the section containing the subreport & check "Suppress blank section"- no subreport, no section.

That should do the trick. You can get fancier with running totals, passed values, etc. but this is the simple, brute-force-&-ignorance approach.
 
It works here- maybe a config issue or the like, I don't know...but it's in probably 1/3 of the reports I've done here. Many are used in external reports or loaded to the hospital intranet, so suppressing (fields, sections, objects, subreports, whatever) is a big deal.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top