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

How to change the color of DBText

edited January 2005 in General
Hello people, this is my first topic here, and would like to know as I make
to change the color of DBText, when the Data of it will be 60 minor who


Debtor to all

Sorry my poor english!

Fellipe H.

Comments

  • edited January 2005
    Hi Fellipe,

    Try using the OnGetText event to check the value in your dataset and change
    the color of the text accordingly. For instance...

    procedure TForm1.ppDBText1GetText(Sender: TObject; var Text: String);
    begin
    if ppReport1.DataPipeline['MyValueField'] < 60 then
    ppDBText1.Font.Color := clRed
    else
    ppDBText1.Font.Color := clBlack;
    end;

    --
    Best Regards,

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