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

counter advice

Status
Not open for further replies.

stevesd

Technical User
Dec 26, 2000
74
US
I need to show group footer records only if there are two In transfers and two Out transfers in a month for the same account. I have logic that says
if Trans.type in [ "AZ", "DR"...] then In and if trans.type in {"AT", "FH"...] then Out
I hope someone can help with what the logic should be to
1) be sure to print only when two of each occur for the same account
2) keep me from having a count that starts with the first record and keeps growing from there.
 
You can create a running total with the proper condition for an OUT_SUM and another for an IN_SUM.

Alternatively, Create a formula that returns 1 if it's an OUT and zero otherwise. SUM (not count) it to produce the
count for the first condition. Do the same for the second.

Cheers,
- Ido ixm7@psu.edu
 
I'm using CR8, so I'm not entirely sure if this will work in earier versions. I didn't use running totals in CR7

First create two running total. Call one "In" and the other "Out"
For the Evaluate - use a formula -- use the formulas you posted.
Trans.type in [ "AZ", "DR"...] No "If Thens"
Have it Reset- On change of group -- use the group you want the summary to appear.

Finally have the field that you want to Print formatted to conditionally suppress using:
({#in} <>2 and {#out} <>2) This will force only records with exactly 2 In's and 2 Out's to print.


 
Sorry, but I have to revise the question. I need to show group footer records if there are at least two records, not exactly two
And, yes I am using CR8 as well.
 
Conditionally suppress with ({#in} <2 and {#out} <2) This will suppress the field if either &quot;In&quot; or &quot;Out&quot; has 0 or 1 records regardless of how many the other has. Or better put. It wll show only if both have at least 2 records.
 
I just realized (5 hours later) that it should be:
({#in} <2 or {#out} <2)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top