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

How to change TppLabel caption at run-time ?

edited July 2002 in General
Hello,

I'm very new to RB and I need help !
I'm writing an application that loads report templates (rtm files)
dynamically according to user's choice.
How can I change the text displayed by a TppLabel component before printing
?

Many thanks !

Comments

  • edited July 2002
    Either on the before print of the band where the label is located or the
    BeforePrint event of the report you can set the label caption property. For
    example:

    procedure TForm1.ppGroupHeaderBand2BeforePrint(Sender: TObject);
    begin
    if then
    ppLabel1.caption := 'Your string here';
    end;

    Basically you just need to change the label caption prior to printing either
    on a report event or another method that is called before the printing of
    the label.

    HTH,

    Kent
This discussion has been closed.