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!

Suppress printing of paired records

Status
Not open for further replies.

victora

Programmer
Feb 11, 2002
118
US
Hi All,
I'm trying to print the 'real' status of a member from a history file. For simplicity sake, I have 4 fields: Member#, EffDateFrom, EffDateThru and TypeCd. I like to suppress printing if it has same EffDate and the TypeCd 'cancelled out' each other. (A - Added, T - Termed) In short, dont print same member added and termed on the same date.

Records:
Member# EffFrom EffThru Type
6112 10/01/2003 10/31/2003 A
6112 10/01/2003 10/31/2003 T
6112 12/01/2003 12/31/2003 A

Expected Output:
6112 12/01/2003 12/31/2003 A

(effectively suppressing the first 2 recs)

I'm running on CR8.5 ; backend DB is MS SQL 2000

Thanks in advance
 
I can't really test this, but I think a suppression formula like the following should work:

(
{table.member#} = next({table.member#}) and
{table.effFrom} = next({table.effFrom}) and
{table.effThru} = next({table.effThru})
)
or
(
{table.member#} = previous({table.member#}) and
{table.effFrom} = previous({table.effFrom}) and
{table.effThru} = previous({table.effThru})
)

Go to format->section->details->suppress->x+2 and place the formula there.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top