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

Detail band in report build export receive page

edited February 2010 in Devices
Hi All,

How can I identify (I have overridden the ReceivePage method and plan to put
this code here) whether a detail band (TppDetailBand) takes up the full
width of it's parent report (parentwidth = true;) or if it has been
customised and made smaller (parentwidth = false;)

I can't find this property in the object inspector during debugging.

I can access the band with the following cast:
TppDetailBand(ADrawCommand.Band)

I need to know if someone has set parentwidth on the detail band to false.
Any ideas?

Regards,

Anton Bosch

Comments

  • edited February 2010
    Ah I see it is just quite the way up and then down

    TppSubReport(TppSubReport(TppDetailBand(TCuraReport(TppChildReport(TppDetailBand(ADrawCommand.band).report).parentreport).bands[X]).objects[X])).Children[X].name
    (ppChildReport1)

    Is there not a simpler way of accessing this currently?

    Anton Bosch

  • edited February 2010
    Hi Anton,

    1. Report Bands do not have the concept of Parent Width or Parent Height.
    By definition they take up the entire width of a page and are sized
    vertically to the user's specifications (dynamically or statically).

    2. If you would like to gain access to a component within the detail band,
    you can use the Band.Objects[] property. Looking at your code below it
    seems you need access to a subreport within the detail band. In this case
    you would simply loop through each component inside the detail band until
    you find the correct subreport object and check its ParentWidth property...

    var
    liObject: Integer;
    begin

    for liObject := 0 to DetailBand.Objects.Count - 1 do
    if (DetailBand.Objects[liObject] is TppSubreport)
    Result := TppSubreport(DetailBand.Objects[liObject]).ParentWidth;

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

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