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

Suppressing entire group if all subreports are blank

Status
Not open for further replies.

BryanLane

Technical User
Apr 28, 2008
52
US
I am using Crystal 11.5.8.826.

I am creating a report to list all the contract pricing we have for customers. There are four different types that we use, each supported by a separate table. They are by Part, by Supplier, by Product Category and Master (which assigns everything for the master customer number to that customer number).

I created four subreports for the different types and dropped them into their own detail section. I then checked off "Suppress Blank Subreport" and "Suppress Blank Section" and I get the results I want for the customers with contract pricing.

Now I want to suppress the entire group (which would be just the GH1 and GF1) for those without contract pricing.

I created shared variables in each of the subreports and passed the distinct record count to the main report and then totaled the four variable. I was thinking I could suppress the header and footer is the value of the "total records" formula was zero, but it is zero at the header for every record and doesn't get a value until the footer.

So how do I suppress the header and footer for the groups where all the subreports are blank?

Thanks, in advance, for the help.

"The problems we face today cannot be solved by the minds that created them."
--Albert Einstein
 
Shared Variable values are only available in the section below the section that uses the subreport. One solution is to make the subreports very small.

You can also use the 'suppress if blank' option for the section, which does take into account values shown by subreports. Does this help?

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
Unless you can access these tables directly in the main report, I believe you will have to add a group header_a section and place copies of the subreport in this section so that the shared variables are available for a section suppression formula for GH_b. You can make the Gh_a section not appear by following the steps you used for the same subs in the detail section.

-LB
 
I was working along the same lines as you suggested LB. But I put them in detail sections. I added a GHb and put the four subreports in GHa and put the Group information (Customer number and Name) in GHb.

I am getting close. If I suppress GHa I lose the shared variable values in GHb, so I have shrunk them down as much as I can, but I end up with lots of "almost white" space between records that have Contract Pricing.

I am thinking the easiest way might be to export it to Excel and delete rows there.

"The problems we face today cannot be solved by the minds that created them."
--Albert Einstein
 
You have to suppress all sections WITHIN the subs, format the sub to "suppress blank subreport", remove the borders, and format the GH_a section to "suppress blank section". The size of the subs is irrelevant. This will make the entire section disppear.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top