views:

44

answers:

2

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?

A: 

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).

CodeByMoonlight
A: 

Please see the accepted answer to your other question here: http://stackoverflow.com/questions/1204774/how-can-i-hide-the-last-row-from-each-group

Dusty
@Dusty. That was Group by Question. This one is different from that. Please understand the question.
Gopal