Mudando valores booleanos no QuickReport
Oi
estou com um relatório onde possuo vários valores booleanos onde a visualização está normal, aparece True onde é True e False onde é False, mas eu gostaria q aparecesse Sim em vez de True e não em vez de false, já inseri o seguinte código no envento OnPrint do Qrdbtext:
if Value = ´True´ then
Value := ´Sim´
else
Value := ´Não´
só q cai sempre no ´Não´;
estou com um relatório onde possuo vários valores booleanos onde a visualização está normal, aparece True onde é True e False onde é False, mas eu gostaria q aparecesse Sim em vez de True e não em vez de false, já inseri o seguinte código no envento OnPrint do Qrdbtext:
if Value = ´True´ then
Value := ´Sim´
else
Value := ´Não´
só q cai sempre no ´Não´;
Fajo
Curtidas 0
Respostas
Erileyvb
11/05/2006
utilize o evento ongettext do próprio campo, neste evento coloque o seguinte código:
if Sender.Value <> Null then
if Sender.Value = True then
Text := ´Sim´
else
if Sender.Value = False then
Text := ´Não´;
Atenção se o seu campo for texto então fica assim:
if Sender.Value <> Null then
if Sender.AsString = ´True´ then
Text := ´Sim´
else
if Sender.AsString = ´False´ then
Text := ´Não´;
if Sender.Value <> Null then
if Sender.Value = True then
Text := ´Sim´
else
if Sender.Value = False then
Text := ´Não´;
Atenção se o seu campo for texto então fica assim:
if Sender.Value <> Null then
if Sender.AsString = ´True´ then
Text := ´Sim´
else
if Sender.AsString = ´False´ then
Text := ´Não´;
GOSTEI 0
Fajo
11/05/2006
Tá do mesmo jeito; só vai pro false sempre colocando Não
GOSTEI 0