Avatar of gilweber3
gilweber3
Flag for United States of America asked on

subreport supress and show 'no records'

I have a summary and a detail section inside a main report (via subreports) I have it so the users show in the summary even if they don't have calls. Unfortunately the detail in the second subreport will show a 'blank' call page. I want to supress this detail and replace it with a text that says 'no calls exist for this user' Is there a way to do this based on logic like this

If subreport is blank show group header three (which will contain the message) ?
Crystal Reports

Avatar of undefined
Last Comment
Mike McCracken

8/22/2022 - Mon
Kent Fichtner

What I would do is make a formula in the main report that has the call amount.

SHARED NumberVar CallAmount = <amount here>

Then in the subreport, you can split the details in to Detail A and Detail B.  Create another Formula in the subreport

SHARED NumberVar CallAmount;

Then on Detail A do a suppression based on formula

CallAmount = 0

In Detail B, put a text box that reads "No calls exist for this user".  Put a suppression based on a fomula

CallAmount <> 0

This should do what you want it to.  Hope that helps a little.
gilweber3

ASKER
The Call amounts are actually in the two subreports. The main report is just a shell for the Hierarchy and contains the 2 sub reports in group headers.
Kent Fichtner

oh...that is great.  Then you don't need to do the formula, just use the database fields in the suppression based on the formula.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
ASKER CERTIFIED SOLUTION
Mike McCracken

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.