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

why grand totals don't show when one of the subtotals is zero?

Status
Not open for further replies.

yehong

Programmer
Sep 22, 2003
291
US
I have two running totals. RunA and RunB. RunA shows the subtotal of salary for group A and RunB for group B. I have formula @GrandRunTotal that adds RunA+RunB.
Say if RunA=$0 and RunB=$45000, then my formula does not return any value. Whereas it should return $45000. If both running totals have values then it returns correct results.
Anybody has idea why the formula is just showing nothing instead of RunB's value?
 
It's not because it's 0, it's because it's null.

A quick cheat is to select File->Report Options->Convert null value to default, but if you need to use Nulls in the report, use a formula instead of the field for doing the sum against:

If isnull({table.salary}) or {table.salary} = 0 then
0
else
{table.salary}

Now use the Running Total against this formula.

-k
 
It worked when I used IsNull function. Initially I was using "If{Table.Field}=0".
Thanks Synapsevampire.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top