Skip to Content
avatar image
Former Member

Crystal Reports Group By

Hi,

I have data like this:

SNO Text DateUpdated

1 abc 1/20/2015

2 abcxyz 1/21/2015

3 xyzabc 1/22/2015

I want to show the Max(DateUpdated) row in the crystal report without Query.

3 xyzabc 1/22/2015

Is it possible with formula?

Please help!

Thanks,

Suman

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Nov 23, 2017 at 06:28 AM

    Hi Suman,

    If your report is based off of a Custom SQL, you should be handling this in the query. You'd benefit from better performance and lesser records being passed into CR.

    If your report is based off of tables, you could do this using a 'SQL Expression' too.

    If you wish to do this in CR using a formula, here's what you need to:

    1. Create a formula (@group) with this code:

    whileReadingRecords;
    '';

    2. Go to the Group Expert and insert a group on this formula field.

    3. Go to the Report Menu > Selection formulas > Group and use this code:

    {DateUpdated} = Maximum({DateUpdated}, {@group})

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded