Results 1 to 5 of 5

Thread: tricky formating question

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Posts
    150

    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
    Attached Images Attached Images  

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: tricky formating question

    Use multiple formulas. One for the sorting and one for the MaxDate.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Posts
    150

    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

  4. #4
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    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})

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Posts
    150

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width