Solved

Hide Main section in Crystal report if the Sub Reports are empty

Posted on 2007-11-14
9
4,272 Views
Last Modified: 2008-03-10
I would like to know how to hide the main section in a report based on the sub reports not having any data to display.
0
Comment
Question by:iaintarr
9 Comments
 
LVL 28

Accepted Solution

by:
bdreed35 earned 250 total points
ID: 20280387
Are you talking about the section that the subreport is in in the main report?
If so, you need to set 2 things.
First, right click the subreport and choose Format Subreport in the popup.
Click the Subreport tab, then set the property "Suppress Blank Subreport", then click ok.
Second, go into the Section Expert in the Main report, click on the section name that the subreport lives in, and set the property "Suppress Blank Section"
Test.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 20280464
That works if the main section is empty.

You need to get the result from the subreport before the section you need to suppress otherwise the section has already started to display and can't be suppressed except in the case of suppressing a blank section.

Is there a query that will determine if the subreport will be empty?

mlmcc
0
 
LVL 1

Author Comment

by:iaintarr
ID: 20280476
No. I am talking about the main detail section in the main report, this section has two sub report detail sections, each with a sub report in them.
I can suppress the subreport detail sections if they do not contain data, but if both sub reports are supressed due to not having data in them, i would like the main detail section, which they fall under, in the main report to be suppressed.
0
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
LVL 1

Author Comment

by:iaintarr
ID: 20280489
mlmcc, the query is the one way i have done it, but would rather have less of a noose around the queries neck.
Was just wondering if there is indeed a way to supress the main section based on the sub reports
0
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 250 total points
ID: 20280601
As far as I know we have given you the 2 ways.  Is there information in the detail section before the subreport?

If not you may be able to have multiple detail sections.
Put the subreprots in the first detail section then based on a shared variable that returns whether there was data in the subreport and supress the subdetail section based on that.

mlmcc
0
 
LVL 1

Author Comment

by:iaintarr
ID: 20280628
i shall do the shared variable approach, see what happens.
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20592587
Forced accept.

Computer101
EE Admin
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question