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

help wth $0

Status
Not open for further replies.

RavenXIII

IS-IT--Management
Mar 18, 2007
26
AU
Hi,

I have a report that adds a bunch of dollar figures together it worksfine except if one of the fields is empty that sub wont show nor will it show in the total but it will add it to the grand total just not display it the details

thanks
 
How can a value of zero be adding to the Grand Total? I don't follow. Do you mean the record is counted?

If you're not getting a display, you probably have a null. Use a formula field with something like
Code:
if isnull({value}) then 0
else {value}
It helps to give your Crystal version - 8, 8.5, 9, 10, 11 or whatever. Methods sometimes change between versions, and higher versions have extra options.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
soz

Im using 8.5

the value im having prob with is null and im adding a variety of ticket prices together per sales person but if there is no price entered it wont show anything but if i add all the subtotals together that the report displays it equals less than the grand total so the results that arnt being displayed are being added together in the grand total

im kinda new to crystal can you please explain your code for me

Thankyou
 
Crystal will stop processing when it hits a null, and will display nothing for it. This can be useful - e.g. an amount was not entered, rather than the amount was entered as zero.

If your sub-totals are less than the grand total, you must somehow be missing some of the sub-totals. It depends what you're doing.

You can find the basics of totals at FAQ767-6524. If it's still not clear, please explain exactly what totalling method you are using. Please post any formulas.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Here is the jist of what im after
Total items sole per salesperson

GH1|Division A
GH2|__salesperson___|__Item A__|__Item B__|__Total__|
GH2|__salesperson A_|__$100.00_|__$50.00__|_$150.00_|
GH2|__salesperson B_|__$200.00_|__$10.00__|_$210.00_|
GF1|_____Total______|__$300.00_|__$60.00__|_$360.00_|


Here is what im getting

GH1|Division A
GH2|__salesperson___|__Item A__|__Item B__|__Total__|
GH2|__salesperson A_|__$100.00_|__$50.00__|_$150.00_|
GH2|__salesperson B_|__$200.00_|__________|_________|
GF1|_____Total______|__$300.00_|__$60.00__|_$360.00_|
 
The simplest solution would be to go to file->report options->check "convert nulls to default values". Otherwise you need to replace the amount fields in the detail section with formulas like:

if isnull({table.amt}) then
0 else
{table.amt}

Then insert your group and grand total summaries on these formulas.

-LB
 
A total in a gruop header will be valid if it is a summary total and if it is specified as being a group header. Just what have you defined?

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top