1 Attachment(s)
tricky formating question
hi,
I have tricky question and I hope someone has an idea.
I have a report that has dates and formula for MaxDate. the dates should be sorted Asc. if the dates are null then I want them to show at the buttom so what I did is replaced the null value with 1-1-2070 so when sorted it will be at the buttom then hid it. this works good as for sorting but when I do the max it will use the 1-1-2070 date which is hidden and I don't want to use. please see attachement.
any ideas are appreciated.
Waely
Re: tricky formating question
Use multiple formulas. One for the sorting and one for the MaxDate.
Re: tricky formating question
Quote:
Originally Posted by brucevde
Use multiple formulas. One for the sorting and one for the MaxDate.
that's what I'm already doing. MaxDate will show Jan-1-70 which I'm hiding
Re: tricky formating question
When do you set the null dates to 2070? If they are Null when Crystal is processing the data, then I don't understand your problem. All you need to do is create a formula with the following code and then sort the report by that formula
If IsNull({TableName.FieldName}) Then
DateSerial (2070,12 ,31 )
Else
{TableName.FieldName}
The Max Date formula would simply be
Maximum ({TableName.FieldName})
Re: tricky formating question
thank you. my problem was that I was doing the date replacement at the database level and that's why it wasn't working properly. when I followed your instructions and did the date on the report level then it worked.
thanks again