How do I print a line on the report with a different color? I want that when a negative value is printed that line or part of it will print on red. Carlos
Use the BeforePrint for the Deatil Band, something like:
procedure TrptItems.ppDetailBandItemsByLotBeforePrint(Sender: TObject); begin with dbiqItems do begin if FieldByName('ItemEstimatedRetailValue').asCurrency > 100 then begin ppDBText13.Font.Color := clRed; end else begin ppDBText13.Font.Color := clBlack; end;
Comments
Use the BeforePrint for the Deatil Band, something like:
procedure TrptItems.ppDetailBandItemsByLotBeforePrint(Sender: TObject);
begin
with dbiqItems do begin
if FieldByName('ItemEstimatedRetailValue').asCurrency > 100 then
begin
ppDBText13.Font.Color := clRed;
end
else
begin
ppDBText13.Font.Color := clBlack;
end;
might be what you want.
Jon
Carlos