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!

Running Total Returns null 1

Status
Not open for further replies.

SQLRory

MIS
Feb 25, 2008
38
GB
Hello,

I have a report which has a number of running total fields which reset after a specific group 'Output'.
They are
Period_01
Period_02
Period_03
etc up to 12.

In another few reports these have been counts on a specific string field, however now need to be sums of a specific field 'traineeid' which is an int.

When these running totals are a sum instead of a count they are null in some instances where it is only sum of values of 0. However, when doing a count on null values it returns 0. I'm lost.

I can easily create a formula field for each running total similar to below:

Code:
[b]if isnull({#Period_05}) then 0 else {#Period_05}[/b]

which will give me exactly what I need but would rather not create additional unnessary formula fields.

Any ideas anyone? In English I want a sum running total to return a 0 instead of null when sum of 0's only?

Thanks
Rory
You'll never know everything, that's half the fun!!!
 
You have some value that is null that the running total is relying upon, so you can either try going into file->report options and checking "convert nulls to default values" or you will need to write a formula as you suggested.

-LB
 
lbass,

When changing null's to default values, what does Crystal use as a default value 0?

Thanks
Rory
 
0 for numbers, "" for strings, date(0,0,0) for dates.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top