Dynamic creation of DBPipeLine
Hi,
How can a PipeLine created at Runtime visible to Report Builder. I'm trying
to create a PipeLine with the following code, the PipeLine is declared
public.
public
myDBPipeline1: TppDBPipeline;
myDBPipeline1 := TppDBPipeline.Create(Application);
myDBPipeline1.UserName := 'myPipeLine1';
myDBPipeline1.DataSource := DataSource1;
ppDesigner1.ShowModal;
myDBPipeline1.Destroy;
Thanks
-Jack
How can a PipeLine created at Runtime visible to Report Builder. I'm trying
to create a PipeLine with the following code, the PipeLine is declared
public.
public
myDBPipeline1: TppDBPipeline;
myDBPipeline1 := TppDBPipeline.Create(Application);
myDBPipeline1.UserName := 'myPipeLine1';
myDBPipeline1.DataSource := DataSource1;
ppDesigner1.ShowModal;
myDBPipeline1.Destroy;
Thanks
-Jack
This discussion has been closed.
Comments
see my comments inline ...
public to what?
never call method 'Destroy', use 'Free' instead!
But if you pass an owner for the constructor then the owner is reponsible to free that component.
Pass 'nil' when you may control the lifetime.
Check property 'Visible' it should be 'True' by default.
If you use the same form (as owner) for the report and the pipeline it should be visible.
regards,
Chris Ueberall;
see my comments inline ...
myDBPipeline1 := TppDBPipeline.Create(Form1);
Assigning the form containing the ppReport as the Owner of the PipeLine did
the trick
It is True by default.
Thanks
-Jack
Here is a good example of how to create a complete report in code.
http://www.digital-metaphors.com/tips/DynamicReportCreation.zip
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
That example is very good, except that the pipeline is created at design
time.
-Jack
if there is a component created at design time and you need to create it at runtime then it is normally a simple task.
Create the component and use the form as owner.
Detect the parent from the component hierarchy in the DFM file (visual components only).
Set all properties as found in the DFM file.
That's it!
regards,
Chris Ueberall;