Results 1 to 6 of 6

Thread: Crystal Reports Formula Error

  1. #1

    Thread Starter
    Lively Member adsc's Avatar
    Join Date
    Nov 2002
    Location
    Kuwait
    Posts
    71

    Question Crystal Reports Formula Error

    Dear All,
    When I type this formula in the formula editor
    <pre>
    if {AN_PaymentDtl.ServiceType} = "N" then "New" else "Old"
    </pre>

    I get this error:
    “The result of selection formula must be a Boolean”

    Thank u for the help
    <><><><><><><><><><><><><><><><><><>
    <><> REMEMBER,,,,KNOWLEDGE IS POWER <><>
    <><><><><><><><><><><><><><><><><><>

  2. #2
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    The error says it all. In some cases you should use a True/False formula, and this seems to be the case. Where are you using your formula?
    'Heading for the automatic overload'
    Marillion, Brave, The Great Escape, 1994

    'How will WE stand the FIRE TOMORROW?'
    Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979

  3. #3

    Thread Starter
    Lively Member adsc's Avatar
    Join Date
    Nov 2002
    Location
    Kuwait
    Posts
    71
    Lunatic3, thank you for your reply.

    I am using the formula inside the CR report in one of the feilds, I selected the filed then selected the "Select Expert", then selected "Formula".
    This field contain one of 2 letters only, "N" for "new" and "O" for "Others", so I want the report to check if it's "O" or "N" then will print the related word in the report.
    <><><><><><><><><><><><><><><><><><>
    <><> REMEMBER,,,,KNOWLEDGE IS POWER <><>
    <><><><><><><><><><><><><><><><><><>

  4. #4

    Thread Starter
    Lively Member adsc's Avatar
    Join Date
    Nov 2002
    Location
    Kuwait
    Posts
    71

    Wink *** RESOLVED ***

    I shouldn't select "Select Expert" option, I should create a new formula with the condition I want, then replace it in the report.

    Thanks for the help.
    <><><><><><><><><><><><><><><><><><>
    <><> REMEMBER,,,,KNOWLEDGE IS POWER <><>
    <><><><><><><><><><><><><><><><><><>

  5. #5
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    I was just writing that
    Also you may write your formula like this:
    IIF ({AN_PaymentDtl.ServiceType} = "N" ,'NEW" ,"Old" )
    'Heading for the automatic overload'
    Marillion, Brave, The Great Escape, 1994

    'How will WE stand the FIRE TOMORROW?'
    Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979

  6. #6

    Thread Starter
    Lively Member adsc's Avatar
    Join Date
    Nov 2002
    Location
    Kuwait
    Posts
    71
    I'll try it....

    Thank you for your help
    <><><><><><><><><><><><><><><><><><>
    <><> REMEMBER,,,,KNOWLEDGE IS POWER <><>
    <><><><><><><><><><><><><><><><><><>

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