cancel
Showing results for 
Search instead for 
Did you mean: 

Suppression not working on first record

alexsr700
Participant
0 Kudos

Hello everyone,

I am looking at a strage problem and cannot seem to solve it.

I have an iterating sample number. So I want to show certain Details Sections and also vertain formula results only when the sample number is changed.

So the suppression rule would be

{SAMPLE_NO}=previous({SAMPLE_NO})

However, when I do this on the first record, it suppresses the Details Section despite it being the first record, so no was the previous sample number was the same.

I am assuming that CR cannot compare to something that does not exist. But I do not know how to solve it.

Does anybody know how I can achieve this?

Thank you for your help

Alex

Accepted Solutions (1)

Accepted Solutions (1)

DellSC
Active Contributor

That's because it's on the first record and there is no previous record. So, you're comparing to Null. When you compare anything to Null, the result is neither True nor False, it's Null. Try changing your formula to this:

not OnFirstRecord and {SAMPLE_NO}=previous({SAMPLE_NO})

-Dell

alexsr700
Participant
0 Kudos

Good morning dell.stinnett-christy

thank you for your explanation.

I had tried the combination with

Not(OnFirstRecord) AND {SAMPLE_NO}=previous({SAMPLE_NO})

and it did not work.

I used the Not(), if that makes a difference. So I will try yours.

I thought that the second half throwing an error (or as I now know actually not returning the necessary information) would cause the entire formula to not return true or false. Because if one part returns NULL then the condition as a whole cannot return true or false and hence fails.

alexsr700
Participant
0 Kudos

So, it seems that

Not OnFirstRecord

works but

Not(OnFirstRecord)

does not.

Do you know what the difference is? It seems illogical to me.

DellSC
Active Contributor
0 Kudos

Seems illogical to me too - but I don't use parentheses in my formulas if they're not needed so I've never (in 25 years of using the software) encountered the issue.

-Dell

Answers (0)