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

Setting Font Style Problem

edited September 2003 in General
Trying to set Font style of a dbtext component
in before print. If I use

dbtext.font.name := 'Arial';
dbtext.font.style := [fsbold];
or
dbtext.font.style.fsbold := True;

I get the error message:
Expected: '(' or '[', but found Style
instead.

I can even get the error message:
Expected: '(' or '[', but found '['
instead. (which sort of baffles me ).

What can I do to set the style? Thanks.
(I am using 7.03 Enterprise)

Comments

  • edited September 2003
    Hi John,

    Your second method is the correct way to set the Font.Style at runtime. In
    testing, this seems to work fine without any compilation errors on my
    machine.

    dbText.Font.Style := [fsBold];

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited September 2003
    On Mon, 8 Sep 2003 08:32:56 -0600, Nico Cizik (Digital Metaphors) wrote:


    I just sent you a very simple example which gives me the
    error message. Please note that the error also occurs on
    my laptop. I am running D7E and RB7.03E. Thanks.
  • edited September 2003
    Hi John,

    I'm sorry, I was unaware you were using RAP. 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:

    BadgeName.Font.Italic := 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
This discussion has been closed.