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!

Running Total WITH Formula

Status
Not open for further replies.

mulema

Technical User
Nov 16, 2002
32
US
Hi all,I know this is a dumb question, just having a bad day. Can't think right.

I created a Running Total field, using the Inbuilt funtion.
-- running Total Name = ITM_CNT
-- Field to Summarise = Item_Codes
-- Type of Summary = Count
-- Evaluate = On Change of Grp #3
-- Reset = Never.

Problem:
--------
I want to create a second Running Total (&quot;ITM_ONHOLD&quot;)using this same in-built function this time to summarise all Item_Codes that are <= 20.
I need help creating the Formula to check for the condition {Item_codes} <= 20 and to Evaluate on Change of Grp# 3. Please what is the best way for me to get round this?

Thxs,
 
Use the 3 formula method:

Grp 3 header:
whileprintingrecords;
numbervar grp3cnt := 0;

Details:
whileprintingrecords;
numbervar grp3cnt;
if {table.Item_Codes} <= 20 then
grp3cnt := grp3cnt+1;

Grp 3 Footer:
whileprintingrecords;
numbervar grp3cnt

-k
 
Thanks, Synapsevampire.
Unfortunately the 3 formula Method which I had earlier tried couldn't work for me because, my detail line is suppressed (not used) since I am eliminating duplicates, I evaluate once for group #3

I attempted this formula in the Evaluate Tab but didn't get the required results.

-- Evaluate ( I chose formula )
Count({ITM_ONHOLD},Table.GrpHdr#3) <= 12

Not sure why counts are wrong.
 
If you only want one record evaluated per Group 3, then try using an evaluation formula like:

{table.Itemcodes} <= 20 and
{table.group3field} <> next({table.group3field})

Reset never.

It would be easier to visualize what you are trying to do if you showed some sample data and how you would like the running total to tally. So, if this isn't what you're looking for, please provide more information.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top