How to create TppLabel at runtime in DetailBeforPrint-Event
Using
******
Reportbuilder 9.01
WinXP
Delphi 7
What i like do create
****************
procedure Tversatile_creator.ppDetailBand1BeforePrint(Sender: TObject);
var my_DBText :TppDBText;
my_Label :Tpplabel;
begin
if Overview_DB.fieldbyname('ART').asintegr = 1 then
begin
my_Label:=TppLabel.Create(ppreport1.Owner);
my_Label.Band:= ppreport1.DetailBand;
my_Label.spTop:=10;
my_Label.spLeft:=10;
my_Label.caption:=' This is a teststring..');
end;
......
...
..
BDEPipeline1 -> Overview_DB
Report.Data -> BDEPipeline1
Report.Groups -> Group[0]:BDEPipeline1.Name
I want to create ppLabels dependent on the content of the Overview_DB...
Thanks for helping
best regards
Erich Wanker
******
Reportbuilder 9.01
WinXP
Delphi 7
What i like do create
****************
procedure Tversatile_creator.ppDetailBand1BeforePrint(Sender: TObject);
var my_DBText :TppDBText;
my_Label :Tpplabel;
begin
if Overview_DB.fieldbyname('ART').asintegr = 1 then
begin
my_Label:=TppLabel.Create(ppreport1.Owner);
my_Label.Band:= ppreport1.DetailBand;
my_Label.spTop:=10;
my_Label.spLeft:=10;
my_Label.caption:=' This is a teststring..');
end;
......
...
..
BDEPipeline1 -> Overview_DB
Report.Data -> BDEPipeline1
Report.Groups -> Group[0]:BDEPipeline1.Name
I want to create ppLabels dependent on the content of the Overview_DB...
Thanks for helping
best regards
Erich Wanker
This discussion has been closed.
Comments
inspect, you can simply use the Report.Datapipeline property to access the
current record in the dataset.
if Report.DataPipeline['ART'] = 1 then
begin
...
end;
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com