Max Grouping

Hi All
I am using crystal reports xi rel2 and remember how to
formulate…I have sales id, sales type and
transaction date.

I have inserted group 1 as sales type, now I want to only
see the last transaction date for this sales type.

Note: A sales id can have many sales type and I am only interested
in the last transaction date record per sale type

Many Thanks


shin_11 (BOB member since 2008-01-03)

Hello Shin_11,

You can take advantage of the way Crystal processes information as it is building the report. I would create the Group 1 as you did, then sort the rest by the Transaction Date in Descending order. Place all of the fields you want into the Group Header. The group headers in Crystal only know about the first record in the group. Since we sorted descending, the latest record for that group should show. Likewise, the group footers only know about the last record in the group. So, alternatively, you could place everything in GF1 instead. If you do, sort the records in Ascending order to get the latest record in the footer.


JBray :us: (BOB member since 2008-07-15)