Solved

Crystal Reports - Section Expert - Supress

Posted on 2014-10-30
5
616 Views
Last Modified: 2014-10-30
I created a report with two subreports (the subreports are in groups so they are filtered properly by ID).  The supreports are based on the same field "PostTax".  It is a bit field which is either true or false.  I used the record selector to filter the record for each subreport.

I need to suppress each subreport if there is no data.

I've tried
NOT (PostTax = True)
Count (PostTax = True) = 0  // This gives me error
ISNULL(PostTax)

But I can't get it to work correctly.

PostTax will have a value but I am trying to figure out how to suppress appropriately for each subreport.

SubreportA the PostTax = False
SubreportB the PostTax = True

So if SubreportA has no PostTax = False records I want to suppress that section
And if SubreportB has no PostTax = True records I want to suppress that section

Any ideas?
0
Comment
Question by:CipherIS
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 40413764
As I read your issue, you are trying to suppress a subreport that has no records through using the section suppression of the main report.

I don't think that is possible since the suppression is done before the subreport runs.

One way to accomplish this will require 3 basic changes.

For this to work you can't have a border around the subreport and the subreport cannot display anything even labels
In the subreport conditionally suppress the sections based on a field that will always have data if there is data for the report

Use   IsNull({yourField})

In the main report
Right click the subreport
Click the last tab
Click SUPPRESS BLANK SUUBREPORT

IN the main report
Right click the section in the left margin
Click SECTION EXPERT
Click the option to SUPPRESS BLANK SECTION

mlmcc
0
 
LVL 1

Author Comment

by:CipherIS
ID: 40414111
That's not working.  I think it's because I have headers in the subreport?
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 40414162
That is why the first step is to SUPPRESS the sections in the subreport if there are no records.

mlmcc
0
 
LVL 1

Author Comment

by:CipherIS
ID: 40414202
So, I'm using the record selectors as a filter.  Doesn't that mean that there are still records?

I also need labels.
0
 
LVL 1

Author Closing Comment

by:CipherIS
ID: 40414311
Thanks for your help.  Greatly appreciated.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

726 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