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!

Sub Total for a Formula

Status
Not open for further replies.

netrusher

Technical User
Feb 13, 2005
952
US
Below I have shown a formula that I have. It basically provides a "1" for a group.
I would like to sum up each of the "1" for each group but because I have filtered out records it wants to give me a total for all of the records including the ones filtered. Example: Group A shows only 8 records, so I have 8 "1". When I total or sum the "1" for Group A I want it to show 8. Instead it shows 945 which includes the records I have filtered out. Can anyone help me accomplish what I need.

if {OMS-SOE.OMS_REFERE}<> "" then 1 else 0
 
Perhaps if you'd shared the filtering criteria, and where you used filtering.

Typically you'd use the same filtering within a Running Total->Evaluate->Use a formula, or directly within the formula.

Group header formula:
whileprintingrecords;
numbervar MyCount:=0

Details:
whileprintingrecords;
numbervar MyCount;
if {OMS-SOE.OMS_REFERE}<> "" then
MyCount:=MyCount+1

Group Footer:

Or in the Runni9ng Total, set the reset to the group, and in the evaluate use a formula place:

{OMS-SOE.OMS_REFERE}<> ""

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top