Reputation: 11982
Using crystal report 9
Example
PersonID Date
3405 28-02-2009
3405 29-02-2009
3406 25-02-2009
3406 30-02-2009
So on…,
I want to hide the last record for each personid
Expected Output
3405 28-02-2009
3406 25-02-2009
So on…,
How to write a formula for this condition?
Upvotes: 0
Views: 2478
Reputation: 12538
In your Detail section's Suppress formula, use this :
(NextIsNull({SomeTable.PersonID}))
OR
({SomeTable.PersonID} <> Next({SomeTable.PersonID}))
Note that this will only hide the row from the report visually, but if you have any subtotals based on the records displayed then you'll need to use running totals instead of regular summary totals (which would still include the hidden data).
Upvotes: 1