Results 1 to 2 of 2

Thread: [RESOLVED] Error code

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2005
    Location
    Madison, WI
    Posts
    136

    Resolved [RESOLVED] Error code

    Crystal will not let me leave the last line as is, I keep getting an error saying A date time is required here: If "$" + {ACH.Amount4} = {@currentACH} And {ACH.Starting4} < CurrentDate And {ACH.Ending4} = Date(2099,01,01) Then
    ""
    How can I fix this, i need the date to not show if = 01/01/2099

    thanks
    If "$" + {ACH.Amount} = {@currentACH} And {ACH.Starting} < CurrentDate And {ACH.Ending} > CurrentDate Then
    {ACH.Ending}
    Else If "$" + {ACH.Amount} = {@currentACH} And {ACH.Starting} < CurrentDate And {ACH.Ending} = Date(2099,01,01) Then
    ""
    Else If "$" + {ACH.Amount1} = {@currentACH} And {ACH.Starting1} < CurrentDate And {ACH.Ending1} > CurrentDate Then
    {ACH.Ending1}
    Else If "$" + {ACH.Amount1} = {@currentACH} And {ACH.Starting1} < CurrentDate And {ACH.Ending1} = Date(2099,01,01) Then
    ""
    Else If "$" + {ACH.Amount2} = {@currentACH} And {ACH.Starting2} < CurrentDate And {ACH.Ending2} > CurrentDate Then
    {ACH.Ending2}
    Else If "$" + {ACH.Amount2} = {@currentACH} And {ACH.Starting2} < CurrentDate And {ACH.Ending2} = Date(2099,01,01) Then
    ""
    Else If "$" + {ACH.Amount3} = {@currentACH} And {ACH.Starting3} < CurrentDate And {ACH.Ending3} > CurrentDate Then
    {ACH.Ending3}
    Else If "$" + {ACH.Amount3} = {@currentACH} And {ACH.Starting3} < CurrentDate And {ACH.Ending3} = Date(2099,01,01) Then
    ""
    Else If "$" + {ACH.Amount4} = {@currentACH} And {ACH.Starting4} < CurrentDate And {ACH.Ending4} > CurrentDate Then
    {ACH.Ending4}
    Else If "$" + {ACH.Amount4} = {@currentACH} And {ACH.Starting4} < CurrentDate And {ACH.Ending4} = Date(2099,01,01) Then
    ""

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Error code

    I think that instead of using an empty string you should be using Null (or whichever keyword Crystal uses to signify nulls).

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