Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Modify ppDBText.font.Style without RAP

edited June 2003 in General
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.

Comments

  • edited June 2003
    Jean-Luc,

    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;


    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.