Solved

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

Posted on 2007-11-14
9
4,269 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
This video discusses moving either the default database or any database to a new volume.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

708 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now