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!

Adding running sum formulas

Status
Not open for further replies.

MegOBytes

Technical User
Dec 23, 2006
23
US
Why won't a simple formula such as

{#RunSum_Vat00}+{#RunSum_Vat04}+{#RunSum_Vat07}+{#RunSum_Vat16}

not return the correct values?

The running sum formulas are set to NOT reset.

RJ Piekos
 
Are the individual running totals accurate? If so, this formula should work when placed in the report footer.

For further help, you would need to provide more detail.

-LB
 
Yes, they appear to be working. Only 1 running sum has an actual sum (#RunSum_Vat16), the other three return nothing as in not even a zero (which i formatted for).



RJ Piekos
 
In what sense are they working if they are returning nulls?

Anyway, change your formula to this:

(
if isnull({#RunSum_Vat00}) then
0 else
{#RunSum_Vat00}
) +
(
if isnull({#RunSum_Vat04}) then
0 else
{#RunSum_Vat04}
) +
(
if isnull({#RunSum_Vat07}) then
0 else
{#RunSum_Vat07}
) +
(
if isnull({#RunSum_Vat16}) then
0 else
{#RunSum_Vat16}
)

-LB
 
its returning null for the those sums because there were no VAT (taxes) for the report period.

i understand your formula but i was wondering if there was a way to put

if isnull({#RunSum_Vat00}) then 0

somewhere in the running sum dialogue box so that it at least returns a zero.

RJ Piekos
 
other info:

each running sum formula has an evaluate criteria that is specific to the run sum formula - as an example:


{F4211.SDLITM} = "VAT00" (for the #RunSum_Vat00 formula)

this criteria seems to work for the Vat tax that actually had data

RJ Piekos
 
I'm not sure what is null in the case where nulls are returned. If the field you are summarizing is null, then replace that with a formula that contains a null check. That is the only place a null check will make any difference.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top