Crystal Report: Unhide data if it is On first Record of the page

14.8k Views Asked by At

I have here a data that will suppress when on change of a field. And I made to suppress it. But I'm having trouble on displaying the record on the first line. Even it is duplicate record I need to display it.

I have tried

Not OnfirstRecord And
if ({onChangefield} = previous({onChangeField})) then
true
else
false

But it doesn't unhide the first line of the record.

Please help.

Thank you in advance. :)

Edit:

It's not "on change field", it is a key field that if this key field is duplicate then the data will suppressed.

2

There are 2 best solutions below

3
Siva On

One way you can do is to print the numbers on the records then supress according to that:

  1. Create a formula @Reset :

    Shared Numbervar count;
    count:=0;
    
  2. Create a formula @Count

    Shared Numbervar count;
    count:=count+1;
    
  3. Create a formula @display

    Shared Numbervar count;
    count;
    

Now write your formula as:

Shared Numbervar count;

If(count=1) And ({onChangefield} = previous({onChangeField})) then
true
else
false
0
Larz On

You just misplace the Not OnfirstRecord I do like below and it's working.

if Not OnfirstRecord And ({onChangefield} = previous({onChangeField})) then
true