How do thi with a boolean field

DarkHorseDarkHorse Member Posts: 389
Hello, I've a boolean type field and in a report, and, if the field is not market it appears as "No". How can I do when the field is not market the report prints it in blank and only appear "yes" when the filed is market?.
Thanks in advance.

Comments

  • garakgarak Member Posts: 3,263
    What? Do you need to know how to filter or how to set a control in the reportsection?
    Do you make it right, it works too!
  • DenSterDenSter Member Posts: 8,304
    You create a new text variable (say we call it YesText), 3 characters, and set the sourceexpr of the control to this variable. In OnAfterGetRecord, you program something like this:
    IF Rec.MyBooleanField = TRUE THEN
      YesText := 'Yes'
    ELSE
      YesText := '';
    
  • DarkHorseDarkHorse Member Posts: 389
    Thanks. I create a textvarible but on save it says "It hopes a variable".MinVar and stops on
    YesText := 'Yes'. Do you know what can be the problem?.
    Thanks for help.
  • DenSterDenSter Member Posts: 8,304
    I don't know what that means, perhaps something got lost in the translation.

    1: create a new global variable, type text, length 3, name YesText
    2: enter the code in the OnAfterGetRecord trigger of the dataitem for the table with your boolean field, replacing the part that says "rec.MyBooleanField with the field you are actually using
    3: in the section designer, click on the control for the boolean field, and in the SourceExpr property, enter the new variable name
    4: save the object

    If it doesn't want to save, please copy the entire error message in here.
  • DarkHorseDarkHorse Member Posts: 389
    Perfect!! =D> , I had put it on sections. It works perfectly, thanks for your help.
  • DenSterDenSter Member Posts: 8,304
    Great, good to hear you got it to work :mrgreen:
Sign In or Register to comment.