CheckBox values
Hi there
I'm using D6.2 and RB6.
I have a an integer field in MySQL which uses 1 for true and 0 for false in
various parts of my application. I don't want to change this for various
reasons.
I have a myDBCheckBox in a report whixh doesnt reflect the value in the
field. I have found the only mention of it in the Developers Guide which
merely says the values can be manipulated by setting the BooleanTrue or
BooleanFalse properties.
I can't seem to get it to display. I have put the folowing code in the
'OnPrint' event:
begin
if tblmembers.FieldByName('Dues').AsInteger = 1 then
cbDues.BooleanTrue := 'True'
else
cbDues.BooleanTrue := 'False';
end;
which has no effect. Can you give me a steer in the right direction please.
Many thanks
I'm using D6.2 and RB6.
I have a an integer field in MySQL which uses 1 for true and 0 for false in
various parts of my application. I don't want to change this for various
reasons.
I have a myDBCheckBox in a report whixh doesnt reflect the value in the
field. I have found the only mention of it in the Developers Guide which
merely says the values can be manipulated by setting the BooleanTrue or
BooleanFalse properties.
I can't seem to get it to display. I have put the folowing code in the
'OnPrint' event:
begin
if tblmembers.FieldByName('Dues').AsInteger = 1 then
cbDues.BooleanTrue := 'True'
else
cbDues.BooleanTrue := 'False';
end;
which has no effect. Can you give me a steer in the right direction please.
Many thanks
This discussion has been closed.
Comments
In your reportdesigner, the dbcheckbox has two properties, BooleanFalse
and BooleanTrue. Behind BooleanFalse you should type a 0, and behind
BooleanTrue a 1. Remove the code in your OnPrint event.
HTH
Arno
--