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!

subreport suppression question 1

Status
Not open for further replies.

LMGroup

MIS
Apr 10, 2006
85
CA
I'm using CR 2008 (CR Developer v12.2.0.290) with a SQL Server 2000 db. I have a very complex report with 28 subreports and 31 detail sections. Before you wonder how crazy I am, let me explain. This is a manufacturing-type work order and each section and most of the subreports represent a different part of our process and those parts can have multiple items in them (or none at all), all linking back to a main job number. There are 21 different tables involved in the whole report, some in the main report, some in the subreports. The report, as a whole, is working very well. The problem lies in suppressing the different subreport detail sections if they aren't needed for a particular job. There is no need to print 5 pages if there is only 1 or 2 pages that have useful information and the rest is blank grids.

At first, I thought I'd add all the tables into the main report and set up variables to determine which of the subreports/sections are used and conditionally suppressing the sections using those variables. That created a linking nightmare in the main report.

Then I thought about setting a shared variable in each of the subreports, but realized that, by the time that variable is evaluated, it's too late for use in the main report.

My next thought is to create a bunch of little, suppressed subreports at the top of the report to set up shared variables that will filter down throughout the report. I'm concerned with lagtime running the report this way.

Does anyone have any suggestions?

Thanks!
Lorraine
 
Are the undesired subreports blank? You can suppress these by formatting the subreport to "suppress blank subreport" as long as the subreport borders are removed and all sections within the sub are blank. Then in the main report, you can format the section containing the sub to "suppress blank section".

-LB
 
Unfortunately, they're not blank. They have headings and grids and conditional lines in them. That's why I'm trying to do it from the main report with conditional suppression. If I ever get the suppression working, I should post it somewhere as an example of an ugly, convoluted report. The good thing about it is that I'm really working on my variable passing skills :)
 
But they are empty of data, correct? Have you gone into file->report options and checked "suppress printing if no records"? See if in conjunction with the steps I mentioned earlier that makes the subs disappear.

-LB
 
PS. I meant within the sub re: changing the report options.

-LB
 
I'm going to have to do a little reworking on the layout, but I think that's going to work. Thank you very much!

L:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top