How i change data at runtime?
when i query data from database it show like below
Name Sex
Jack 1
Halean 0
Tom 1
Bon 1
Eva 0
how i change sex value from 1 to "male" and 0 to "female"
i try to code in onbeforeprint like this
var
tmpMemo: TfrxMemoView;
begin
tmpMemo := frxReport1.FindObject('memoSex') as TfrxMemoView;
if query1.fieldbyname('sex').AsInteger = 1 then
tmpMemo.Text := 'male'
else
tmpMemo.Text := 'female';
end;
compile and run it not work 'cause in memoSex filed in report it always
show 1 or 0
how can i do?
Name Sex
Jack 1
Halean 0
Tom 1
Bon 1
Eva 0
how i change sex value from 1 to "male" and 0 to "female"
i try to code in onbeforeprint like this
var
tmpMemo: TfrxMemoView;
begin
tmpMemo := frxReport1.FindObject('memoSex') as TfrxMemoView;
if query1.fieldbyname('sex').AsInteger = 1 then
tmpMemo.Text := 'male'
else
tmpMemo.Text := 'female';
end;
compile and run it not work 'cause in memoSex filed in report it always
show 1 or 0
how can i do?
Comments
[Iif(dbfield."sex"=1,'male','female')]