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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comparision Report Field Not Showing if Zero

Status
Not open for further replies.

sccm09

Technical User
Apr 13, 2009
3
I have a financial report comparing two years worth of data. They are set up as subreports with paramenters for choicing which years. For 2007 there are "deposits" but there are not for 2008. If I put 2007 as the report and 2008 as the subreport the field "deposits" shows with a total for 2007, but there is no amount for 2008. If I put 2008 in the report and 2007 in the subreport, no header shows, there is nothing for 2008, but the total shows in 2007. Since this is a comparison report, I need each line to show if it is in either report. If the amount is zero it should hold that numeric value.

This is my first major attempt to create a Crystal report and I don't know how to get this to work. Any suggestions would be greatly appreciated.
 
Is there actually a record in your database with a value of zero, or is there no record in your database?

Software Sales, Training, Implementation and Support for Macola, Synergy, and Crystal Reports. Check out our Macola tools:
 
Are you dealing with nulls? You might need to use a formula field, something like
Code:
if isnull({your.amount}) then 0 
		         else {your.amount}

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
dgillz - it's not really zero, but if there is no activity for that line item it would not be there. I don't believe there is actually a zero record, more like no record at all.

Madawc - thanks for the formula. I will give it a try, but based on dgillz comment, I don't know if that is the answer. I'll post later whether or not this work.

Thanks to both of you for your replies.
 
How is the subreport linked to the main report? In what report section is the subreport located? Are both years always represented in the main report?

-LB
 
The subreport is in the report header. Both years are visible on the report. This is a side by side financial statement comparison report. One is in the main report, the other is in the subreport. There is a parameter to choose the year in each portion of the report - main and sub.
 
You only answered one of my questions.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top