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

Running Total Summary - Display Zeroes for NULL value?

Status
Not open for further replies.

gal

Programmer
Mar 5, 2002
25
US
C.R.8.5 - How can I default a Running Total Summary field to display a Zero when it has a NULL value? I have several Running Total fields that display as a Blank in the group footer if the summary value is not 1 or greater. The Running Total field uses the Evaluate, Use of Formula option.

The following Running Total formula is designed to assign a value of 1 if the named formula has a value of 1 or more and either is the last record for the ID or is the last record on file. The R.T. formula used is:

{@DX_SA_ADM_PRIM} >= 1 and
(
{ss_history_diagnosis.PATID} <> next(
{ss_history_diagnosis.PATID} )
or
onlastrecord
)

Is there a way to rewrite this formula using correct syntax to default it to Zero if it has a NULL value? Or is there a report or field property that I can set to default all NULLS to Zero?
 
A simple means is to create a formula tro reference the Running Total, as in:

if isnull(#MyRT) then
0
else
#MyRT

-k
 
Thank you for your quick response, synapsevampire. I actually had created a few formulas like that, but having as many fields and group footings, I thought there might be a quicker way of doing it. Your help is much appreciated.
 
I don't know if 8.5 has it, but in 9, under File, Report Options, you can check Convert Null values to Default.

Not sure if this works on formulas, but it does work on database fields.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top