Hi,

I'm trying to make the background of dbfield in a LazReport different.
I tried using the userds example, but it does not work.
This is what I wrote :

procedure TDataModule1.frReport1EnterRect(Memo: TStringList; View: TfrView);
begin

if FNegative then
 View.FillColor:=clRed
else
  View.FillColor:=clWhite;
end;

procedure TDataModule1.frReport1GetValue(const ParName: String;
  var ParValue: Variant);
begin

Append(OutFile);
writeln(OutFile,ParName);
CloseFile(OutFile);
if ParName='qrySamenVatting."VERSCHIL"' then
  FNegative:=qrySamenVattingVERSCHIL.AsFloat<0.0
else
  FNegative:=false;
end;

This colors the wrong field. After some debugging I found EnterRect is fired before GetValue. So, how can I modify the color based on the value ?


Koenraad.

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to