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

Creating a ppShape or ppLabel at Runtime

edited January 2010 in General
Hi there,

I've looked through the newsgroup, searched Codenewsfast.com and also looked
through the RB demos but I still can't get a shape to appear on my detail
band by creating it at runtime.

I've been trying some code I found online to create a ppLabel but it just
isn't working for me... does anyone know what I'm doing wrong? I would have
thought that it should be quite simple to create shapes/labels at runtime...

procedure TfrmReport_0012.ppDetailBand1BeforePrint(Sender: TObject);
var
my_Label: TPpLabel;
begin
inherited;
my_Label:=TppLabel.Create(Self);
my_Label.spTop:=10;
my_Label.spLeft:=10;
my_Label.caption:=' This is a teststring..';
my_Label.Band:= ppDetailBand1;
end;


I've tried moving the code to the various Before/After Print/Generate events
but still don't seem to be having any luck.

Kind regards,
Graham

Comments

This discussion has been closed.