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

Adding Running Total Fields using a formula

Status
Not open for further replies.

rafeman

Technical User
Oct 20, 2004
66
GB
Hi there,

I have many running total fields which need to be be added up to produce totals. I have tried a formula whereby I simply do RT+RT+RT. This works great, unless one of the running totals has a zero value, whereupon I get nothing printed. If I take the zero running total out it works. What am I dong wrong?
 
It's not that the RT has a zero value, it's that is has a null value, which is common to SQL and many programming languages.

Try:

IIF(isnull({#RT1}),0,{#RT1})
+
IIF(isnull({#RT2}),0,{#RT2})
+
IIF(isnull({#RT2}),0,{#RT2})

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top