Solved

Crystal Reports - Section Expert - Supress

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

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…
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 …
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

743 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

13 Experts available now in Live!

Get 1:1 Help Now