Solved

Crystal Reports - Section Expert - Supress

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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

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 …
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

778 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