[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

record suppression based on previous record

Posted on 2011-04-20
10
Medium Priority
?
309 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?
0
Comment
Question by:shockacon
  • 5
  • 5
10 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 35437311
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
0
 

Author Comment

by:shockacon
ID: 35437388
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
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 35437415
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
0
Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

 

Author Comment

by:shockacon
ID: 35437428
if its in this order then
53
2788
15821

then suppress all three
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 35437436
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
0
 

Author Comment

by:shockacon
ID: 35437455
no difference
the trailnig 2788 and 15821 still show
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 total points
ID: 35437505
Try it this way

IF (not OnLastRecord and {RecordType} = 53 AND Next({RecordType}) = 2788) then
    TRUE
ELSE IF (Not OnFirstRecord AND Not OnLastRecord AND Previous({RecordType}) = 53 AND {RecordType} = 2788 AND Next({RecordType}) = 15821) THEN
    TRUE
ELSE IF (Not OnFirstRecord AND Previous({RecordType}) = 2788 AND {RecordType} = 15821)
    TRUE
Else
    FALSE

mlmcc
0
 

Author Comment

by:shockacon
ID: 35437521
same thing
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 35437625
Can you upload the report

mlmcc
0
 

Author Comment

by:shockacon
ID: 35437695
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. :)
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

868 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question