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

How to change a font style in RAP

edited October 2003 in DADE
Hi,

I think I missed something
I have a next code

procedure DetailBeforePrint;
var
lfFont: TFont;
begin
if ABCOMPANY['COMPANYID'] ='AA' then
begin
lfFont.Color := clRed;
lfFont.Size := 16;
lfFont.Style := [fsBold];
end
else
begin
lfFont.Color := clBlack;
lfFont.Size := 10;
lfFont.Style := [];
end;
end;


and lfFont.Style := [fsBold]; not allowed to be used
Is here better way?

--
Serge Dosyukov
Borland Delphi 6 product certified
MCP
"Programming is not a job; it is a style of life."

Comments

  • edited October 2003
    Hi Serge,

    Since RAP does not support Delphi Sets, we decided to make each Font.Style
    into a boolean property to
    enable a user to access them. You're RAP code should look something like
    the following:

    Label.Font.Italic := True;
    Label.Font.Bold := True;

    For more information, please see the RAP FAQ located in the ReportBuilder
    help file in the RAP Reference section.


    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited October 2003
    I swear I did try it and it didn't work ;-)
    Thank you

    --
    Serge Dosyukov
    Borland Delphi 6 product certified
    MCP
    "Programming is not a job; it is a style of life."


This discussion has been closed.