Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Posts
    5

    Unanswered: Report : how to convert a yes/no field in text ?

    it seems to be the only solution for me to export a report with yes/no field in a.rtf file.

    I explain :
    i got in a report a yes/no field wich tells if an artist use or not a type of music.

    Artiste Name : MUSE

    ( ) Techno
    (x) Rock (it's design like a checked box)

    when i export in rtf i got :

    Artiste Name : MUSE

    Techno
    Rock

    so the boxes did not exported !

    if i had independents fields which source is the "yes/no" fields, i have:

    Artiste Name : MUSE

    ( ) Techno 0
    (x) Rock -1

    ok, this can be exported !
    but now I want to hide or not the type of music field.

    So i put this script on report opening:

    if [techno].value = 0 then
    [techno_etiquette].visible = true
    else
    [techno_etiquette].visible = False
    end if

    if [rock].value = 0 then
    [rock_etiquette].visible = true
    else
    [rock_etiquette].visible = False
    end if

    but !!
    [techno].value and [rock].value are not the good words for the value of the fileds ...
    can anyone help me ?

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713

    Re: Report : how to convert a yes/no field in text ?

    Originally posted by deadpoet
    it seems to be the only solution for me to export a report with yes/no field in a.rtf file.

    I explain :
    i got in a report a yes/no field wich tells if an artist use or not a type of music.

    Artiste Name : MUSE

    ( ) Techno
    (x) Rock (it's design like a checked box)

    when i export in rtf i got :

    Artiste Name : MUSE

    Techno
    Rock

    so the boxes did not exported !

    if i had independents fields which source is the "yes/no" fields, i have:

    Artiste Name : MUSE

    ( ) Techno 0
    (x) Rock -1

    ok, this can be exported !
    but now I want to hide or not the type of music field.

    So i put this script on report opening:

    if [techno].value = 0 then
    [techno_etiquette].visible = true
    else
    [techno_etiquette].visible = False
    end if

    if [rock].value = 0 then
    [rock_etiquette].visible = true
    else
    [rock_etiquette].visible = False
    end if

    but !!
    [techno].value and [rock].value are not the good words for the value of the fileds ...
    can anyone help me ?
    In your textbox put: =IIf([YesNoField]=True,"True","False")

    or On/Off, Yes/No, Blue/Green, ... or whatever pair you wish ...

  3. #3
    Join Date
    Feb 2004
    Posts
    5

    Re: Report : how to convert a yes/no field in text ?

    Originally posted by M Owen
    In your textbox put: =IIf([YesNoField]=True,"True","False")

    or On/Off, Yes/No, Blue/Green, ... or whatever pair you wish ...

    thankyou !!
    it seems logic ...
    but can you tell me where do you put that ?
    in "control source" ?
    in format ?
    in mask ?

    if i put
    =IIf([techno] = True, "True", "False")
    in the textbox ,source control , i have a syntax error

    it's " not ' or '' or `?

  4. #4
    Join Date
    Feb 2004
    Posts
    5

    Re: Report : how to convert a yes/no field in text ?

    i find it !!
    it's a stupid french translation ...

    on my french version , i must put that :
    =VraiFaux([techno]=Vrai;"True";"False")

    with ";"

    thank you
    all !

Posting Permissions

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