Results 1 to 3 of 3

Thread: [RESOLVED] A currency amount is required here ???

  1. #1

    Thread Starter
    Hyperactive Member DubweiserTM's Avatar
    Join Date
    Dec 2005
    Location
    St-Ferdinand, Québec
    Posts
    427

    Resolved [RESOLVED] A currency amount is required here ???

    Hi everybody !

    In my table there are 3 fields (Description / Check / Cout)

    If the value of Check is true I want the amount in Cout and if it's false I want that "Exclus" appears on the report instead of the amount ???

    I add the code below in Formula editor:

    If {TravChantier.Check} = "True"
    Then {TravChantier.Cout}
    Else "Exclus"

    I got the error "A currency amount is required here"

    I understand the error, but I dont know how to do what I want ???

    Thanks in advance !
    DubweiserTM

    If your question has been answered, you can mark a thread as resolved...

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

    Re: A currency amount is required here ???

    A formula can only return 1 datatype. Use the ToText statement to convert the currency field to a formatted string.

    Code:
    If {TravChantier.Check} = "True" Then
       ToText({TravChantier.Cout})
    Else 
       "Exclus"

  3. #3

    Thread Starter
    Hyperactive Member DubweiserTM's Avatar
    Join Date
    Dec 2005
    Location
    St-Ferdinand, Québec
    Posts
    427

    Re: A currency amount is required here ???

    Quote Originally Posted by brucevde
    A formula can only return 1 datatype. Use the ToText statement to convert the currency field to a formatted string.

    Code:
    If {TravChantier.Check} = "True" Then
       ToText({TravChantier.Cout})
    Else 
       "Exclus"
    Thanks for this information, Im very new with CR !
    DubweiserTM

    If your question has been answered, you can mark a thread as resolved...

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