Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 712
  • Last Modified:

Crystal Reports - Section Expert - Supress

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
CipherIS
Asked:
CipherIS
  • 3
  • 2
1 Solution
 
mlmccCommented:
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
 
CipherISAuthor Commented:
That's not working.  I think it's because I have headers in the subreport?
0
 
mlmccCommented:
That is why the first step is to SUPPRESS the sections in the subreport if there are no records.

mlmcc
0
 
CipherISAuthor Commented:
So, I'm using the record selectors as a filter.  Doesn't that mean that there are still records?

I also need labels.
0
 
CipherISAuthor Commented:
Thanks for your help.  Greatly appreciated.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now