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

Sum of the field

Status
Not open for further replies.

rajasan77

Programmer
Jan 12, 2010
30
US
I want to find the sum of the filed in grouping. Whenever, there is zero, it should display zero otherwise the sum value.

Ex:1
1
0
1
---
2

Ex:2
----
0
0
---
0
---

I am using the sum function but it does not display anything when the sum value is zero.

can anyone help.???
 
Do you mean that the group itself does not appear when the value is zero, i.e., there are no records for a particular group? If this is the case, then you could use running totals that are displayed in the report footer, one for each group instance, using an evaluation formula to limit results to the particular group, e.g.:

{table.group} = "A"

-LB
 
No. I get other records/fields for the same group. only the sum field is not appearing when the sum is zero. It displayes only whenenver sum is greater than zero.
 
Sounds like you might have it formatted to "suppress if zero". Right click on the summary->format field->number->customize->uncheck "suppress if zero". Also check to see if you have conditional formula suppressing it in format field->suppress->x+2.

-LB
 
PS. You didn't express the summary in a formula as a string, did you? If so, you should show us the formula.

-LB
 
This is the formula I have:

formula name is Count_Fulfill
(
If not isNull({Command.ORDERING_DATE}) then
1
Else
If{Command.Alert_Action}="Acknowledge/Override Alert" then
1
Else
0
)

Then I use the summary function to sum that above formula.

I have NOT checked the "Suppress if Zero"

 
The formula looks okay to me. Are you just inserting a summary on the formula? Does it always return a value if placed in the detail section? And did you check field formmating->common tab->suppress->x+2?

-LB
 
Thanks LB for your suggestions.

I had to change the formula like below. It does not check the null for {Command.Alert_Action}=" in the else part . It has to be checked explicitly.

(
If not isNull({Command.ORDERING_DATE}) then
1
Else
If IsNull(If{Command.Alert_Action}) then
0
Else
If{Command.Alert_Action}="Acknowledge/Override Alert" then
1
Else
0
)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top