Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal 2013 2

Status
Not open for further replies.

jchewsmith

Technical User
Nov 20, 2006
161
US
Is there a way to show a zero in a column that is based on a subreport if there are not amount returned?


Customer 2016 total 2015 total
abc co 5,000 2,000
def co 3,000
jed co 0 1,000

The subreport is to 2015 total column and it does not return any value if there are not any records for that company in 2015.

 
I only worked in 2013 for a few hours. We tested it and will get it "sooon". In previous versions create a formula:
If IsNull({field}) then
0
else
{field}
 
Where do you put that formula? I have the sub report as a column in the report.
Main report:
Customer 2015 2016
abc Info from main report info from sub-report

 
In the absence of specific details I am assuming that the Sub Report uses a Summary in the RF section to display the total for the previous year.

I would then replace the Summary field in the Sub Report with the following:

Code:
If      ISNULL(SUM({Table.Field}))
Then    0
Else    SUM({Table.Field})

If my assumption is incorrect, please provide specific details about the structure of the main report, the sub report and how they are linked.

Hope this helps.

Cheers
Pete

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top