Home General

Font printing problem on certain values - HELP!

edited June 2001 in General
Hi

I have a report which inherits from a custom base class report we have. I
try to print certain dbtext's in the report in certain colors but it does
not work. It changes the font on the first pass correctly but on the second
pass changes everything to the new font whether the test for the value is
true or not.
I do not know how to solve this!

file://example of code
procedure TfmAuditTrail.stockcodePrint(Sender: TObject);
begin
try
inherited;
if ppReport.FirstPass then begin
if grpHeaderType.FieldValue = 7 then begin
stockcode.Font.Color := clLtGray;
end;
end;
except
on E : Exception do begin
Log_Logstring(EXCEPTION_LOGFILE,' ZAUDITTRAIL :
uAuditTrail_stockcodePrint '+E.message);
end;
end;
end;

--
Ruaan Barnard
Programmer
CCS Software
Bloemfontein
South Africa
+27 51 4041901
ruaan@ccs-software.co.za
www.ccs-software.co.za

Comments

  • edited June 2001
    If, at the end of the first pass, the dbText is set to a certain color, then
    for everytime the dbText prints in the second pass, it will print that
    color, regardless of what its value was in the first pass. I would suggest
    using the second pass to change the colors.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited June 2001
    Thanks Jim

    My problem is solved.

    Regards

    Ruaan
This discussion has been closed.