I am new to crystal reports, and I have to prepare an ageing report for tickets.
This has to be done on crystal reports 2008. The database is SQL.
There are tickets that are still open, and tickets that are closed.
For closed tickets, the duration should be closed time- open time
And for open tickets, duration should be current time- open time.
I did the formula as below:
if IsNull({table.CLOSE_TIME}) Then
datediff('s',{table.OPEN_TIME}, currentdatetime) Else
datediff('s',{table.OPEN_TIME}, {table.CLOSE_TIME});
However, this is working only when the close time field has value. For tickets that are open, the duration shows as 0 day 00 h 00 min
Kindly request you to please help.