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

how to know if a report has subreport and access it

edited May 2004 in General
Hi...
Please, forgive my English :-(

I can loop through the objects in a report, but I want to know if the object
is a SubReport...
I have to do this, because I don't know another method:
if pos('SubReport',lObject.Name)<>0 then ......

Then... How can I access the DetailBand property of the SubReport?
I need to change the "BandsPerRecord" property of a SubReport.

Is it possible?
Thanks!

Comments

  • edited May 2004
    Hi Santy,

    While looping through each report object, you can use the 'is' operator to
    check if the current object is a TppSubreport... For instance:

    if (lObject is TppSubReport) then
    lChildReport := TppSubReport(lObject).Report;

    Then you will need to loop through each band of the child report's Band[]
    List and do the same thing to find the TppDetailBand.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.