Programmatically adding TppComponents to a report band before displaying the designer
I've been trying to do this without success. We want to provide a way
for Customers to edit reports based on the data that is available, as
opposed to just loading up templates. Is this possible?
1. User selects from a checkbox that I've populated with the names of
columns of data available (this is for data pumped from a JITPipeline BTW)
2. These selected columns are added to a Detailband, spaced out equally.
3. The user views this, adjust the columns then saves out the report.
4. The user runs the report.
I've tried adding the Component to the band using AddObject() and making
sure that it has the Report as parent, is visible etc but I've not
succeeded so far. Is this possible?
Thanks
David Bolton
for Customers to edit reports based on the data that is available, as
opposed to just loading up templates. Is this possible?
1. User selects from a checkbox that I've populated with the names of
columns of data available (this is for data pumped from a JITPipeline BTW)
2. These selected columns are added to a Detailband, spaced out equally.
3. The user views this, adjust the columns then saves out the report.
4. The user runs the report.
I've tried adding the Component to the band using AddObject() and making
sure that it has the Report as parent, is visible etc but I've not
succeeded so far. Is this possible?
Thanks
David Bolton
This discussion has been closed.
Comments
See the Code Based thread of the Tech Tips newsgroup for examples of
creating reports dynamically in code.
The basic approach to creating a component and add it to a band is:
myLabel := TppLabel.Create(Self); {where Self is the Report.Owner}
myLabel.Band := myReport.DetailBand; {the Band property is essentially the
parent)
--
Nard Moseley
Digital Metaphors
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
properties (left etc) instead of the Spleft etc.
David