formula fields RRS feed

  • Question

  • User713522837 posted

    I have a datetime column in a table. 

    For example,

    datetime code
    09/11/2011 5 
    09/11/2011 2 
    10/11/2011 5 

    My output should be

    fromdate enddate
    10/11/2011 09/11/2012

    the following sql query is working fine.

    select Max(datetime) as fromdate, (dateadd(day, -1, dateadd(year,1, max(datetime)) as enddate from table1 where code = 5 

    I am trying to write two formula fields for the above two columns in crystal reports, but having difficulty.
    Can anyone help with it.

    Wednesday, November 9, 2011 2:29 PM


  • User-37275327 posted


    Use a Cross tab report from Crystal Report menu. You can use basic date select sql string. Give date as colum in pivot grid on crystal reort and will eliminate duplicates.


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, November 11, 2011 2:29 AM