Modify ppDBText.font.Style without RAP
Hi,
I use a Dataset which contain:
Name
Age
Flag
The report print
Name | Age
If Flag = 1 then I need to change Font.Style to fsBold.
I have tried code in ppDetailBand1 but it doesn't mork.
I have also tried in ppDBText1.OnPrint but the code doesn't work none.
Is it a way to do that without RAP ?
Jean-Luc M.
I use a Dataset which contain:
Name
Age
Flag
The report print
Name | Age
If Flag = 1 then I need to change Font.Style to fsBold.
I have tried code in ppDetailBand1 but it doesn't mork.
I have also tried in ppDBText1.OnPrint but the code doesn't work none.
Is it a way to do that without RAP ?
Jean-Luc M.
This discussion has been closed.
Comments
Use the BeforeGenerate event of the detail band to check if the Flag field
is 1 and set the font style to fsBold. Be sure to reset the font style once
afterward in the same event. Something like the following...
procedure TForm1.DetailBandBeforeGenerate(Sender: TObject);
begin
if (true) then
Font.Style.fsBold := True;
else
Font.Style.fsBold := False;
end;
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com