Create Component...
I need to know the parent (ie. report parent) of a newly created sub report,
either at the CreateComponent or ValidateComponent time(tppDesigner) as I am
performing some code here that require me knowing the parent at this time.
Unfortunately the ReportParent property is jsut returning null.
Anyone's advice???
--
Regards
Conrad Rowlands
Callards Technology Ltd
either at the CreateComponent or ValidateComponent time(tppDesigner) as I am
performing some code here that require me knowing the parent at this time.
Unfortunately the ReportParent property is jsut returning null.
Anyone's advice???
--
Regards
Conrad Rowlands
Callards Technology Ltd
This discussion has been closed.
Comments
Band property. If you want the TppReport object, access the
Subreport.MainReport property.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
correct.....
--
Regards
Conrad Rowlands
Callards Technology Ltd
Drop a TppReport on a form.
Open the report designer in Delphi.
Drop a TppSubreport in the report in the detail band. This should be called
ppSubreport1.
Go into the workspace of ppSubreport1.
Drop a TppSubreport in the detail band of ppSubreport1. This should be
called ppSubreport2.
Then add a button on the form, an OnClick event handler and code this:
showmessage(ppSubReport2.Parent.ClassName); {TppDetailBand}
showmessage(ppSubReport2.Band.ClassName); {TppDetailBand}
showmessage(ppSubReport2.Report.MainReport.Name); {ppReport1}
showmessage(ppSubReport2.Report.MainReport.ClassName); {TppReport}
The results I get are to the right in the comments.
PpSubreport 2 is parented by ppSubreport1's detail band. Accessing the
MainReport property of the nested ppSubreport2.Report, will return the
TppReport which is ppReport1 on the form.
Does this test fail for you?
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com