We help IT Professionals succeed at work.

record suppression based on previous record

Brandon
Brandon asked
on
321 Views
Last Modified: 2012-06-21
Ok I have a fairly complex suppression issue Im trying to sort thru and I found a partial answer in another post which is this..

(not OnLastRecord and next({@Status}) = {@Status})           //Suppresses the record if the next matches
OR
(not (onfirstrecord) and previous({@Status}) = {@Status})   //Suppresses the record if the previous matches

Ok so I have three conditions and let me see if I can explain what im trying to do..
up to three records per customer - which can be record type 53 2788 and 15821

I want suppress all 53's if the following record is 2788 (I want to keep all 53's if the following record isnt 2788)
I want supress all 53's if the following record is 2788 and the one after that is 15821, as well is the 2788s and the 15821s that follow the 53's

make sense?
Comment
Watch Question

Mike McCrackenSenior Consultant
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2013

Commented:
IN the section(record) suppression formula try

(not OnLastRecord and {RecordType} = 53 AND Next({RecordType}) = 2788)
OR
(Not OnFirstRecord AND Not OnLastRecord AND Previous({RecordType}) = 53 AND {RecordType} = 2788 AND Next({RecordType}) = 15821)

Can you have a 2788 that doesn't follow a 53?

mlmcc
BrandonCEO - Janitor

Author

Commented:
Its doing the first part but not the second.. the following  2788 and 15821 arent suppressing after the 53..


and no I dont believe there will be a case where a 2788 doesnt follow a 52
Mike McCrackenSenior Consultant
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2013

Commented:
I asked that because you can only look back 1 record.

Do you want the 2788 suppressed if it is after a 53 or only if it is after 53 and followed by 15821?

mlmcc
BrandonCEO - Janitor

Author

Commented:
if its in this order then
53
2788
15821

then suppress all three
Mike McCrackenSenior Consultant
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2013

Commented:
Try

(not OnLastRecord and {RecordType} = 53 AND Next({RecordType}) = 2788)
OR
(Not OnFirstRecord AND Not OnLastRecord AND Previous({RecordType}) = 53 AND {RecordType} = 2788 AND Next({RecordType}) = 15821)
OR
(Not OnFirstRecord AND Previous({RecordType}) = 2788 AND {RecordType} = 15821)

mlmcc
BrandonCEO - Janitor

Author

Commented:
no difference
the trailnig 2788 and 15821 still show
Senior Consultant
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2013
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
BrandonCEO - Janitor

Author

Commented:
same thing
Mike McCrackenSenior Consultant
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2013

Commented:
Can you upload the report

mlmcc
BrandonCEO - Janitor

Author

Commented:
no sir. proprietary data / fields.  

I think I just found a work around... I added
or if {field} = 156251 or {field} = 2788
then true

which I realized I didnt need thise records after your supprerssion.  cake. :)
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.