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

Display zero or null sums

Status
Not open for further replies.

smeyer

IS-IT--Management
Nov 15, 2002
52
US
I have a report (ver. 8.5) with a subreport that does not display anything except text for the main report and displays no subreport if there is no information. I tried setting the fields to zero if there is no data but it doesn't work.

If there is no data, is there a way to display this zeros instead and make the subreport display no matter what?
 
In the subreport, try to use a Report Footer section to display the totals, rather than a Group Footer (which gets created only if there are records in the subreport).

hth,
- Ido
CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Both the subtotals in the main and the subtotals in the subreport are in the report footer.
 
Have you got "Convert Database NULL Values to default" checked in your report options. Gary Parker
Systems Support Analyst
 
That option is grayed out under report options.
 
You will need to Uncheck the "Perform Grouping on Server" option to make this available.

Gary Parker
Systems Support Analyst
 
I did this and it seems to speed up the report but still does not give zeros or default values.

I am using subtotals of a formula field if that helps.
 
Let me get this right :-

You say that your sub report doesn't display in the main report when no records are returned or is it just the values that don't display ?

I hope it's the 2nd scenario.

You want the sub totals in your sub report to display 0 when no records are contained within it ?

You could try creating a new formula

//DisplayNoRecords
If IsNull({@ExistingFormulaField}) then
0
else
{@ExistingFormulaField})

Hope this helps Gary Parker
Systems Support Analyst
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top