Crystal Reports - Section Expert - Supress

Posted on 2014-10-30
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

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?
Question by:CipherIS
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
LVL 101

Accepted Solution

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

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


Author Comment

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

Expert Comment

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


Author Comment

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.

Author Closing Comment

ID: 40414311
Thanks for your help.  Greatly appreciated.

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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. …
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 …
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

705 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