For future reference, please do not post your question subject in all capital letters.
You can use an event such as the Band.BeforePrint or DBText.OnPrint to determine what the record value is and then alter the color of the component accrodingly. For instance...
procedure TForm1.ppDetailBand1BeforePrint(Sender: TObject); begin if not(Report.DataPipeline[Paid]) then ppDBText1.Font.Color := clRed; end;
Comments
For future reference, please do not post your question subject in all
capital letters.
You can use an event such as the Band.BeforePrint or DBText.OnPrint to
determine what the record value is and then alter the color of the component
accrodingly. For instance...
procedure TForm1.ppDetailBand1BeforePrint(Sender: TObject);
begin
if not(Report.DataPipeline[Paid]) then
ppDBText1.Font.Color := clRed;
end;
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thanks.
Is there any way inside of report to check the field value and change the
color.
for example,
I create a variable field called OverDue
Can I do this way through calculation
if (CurrentDate>DBPipeline1['xDueDate']) then
OverDue.font.color := clRed
else
if (CurrentDate=DBPipeline1['xDueDate']) then
OverDue.font.color := clYellow
else
OverDue.font.color := clBlack;
Thanks
York
Yes, the following code should work. Be sure you are using an event that
fires before the OverDue variable prints.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com