Font printing problem on certain values - HELP!
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
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
This discussion has been closed.
Comments
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
http://www.digital-metaphors.com
info@digital-metaphors.com
My problem is solved.
Regards
Ruaan