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

subreport elements not seen

edited June 2005 in Subreports
Hi
i have some pronlems with runtime creation of subreports.
i am creating subreports in runtime , then i am adding TppLabel and
TppDbtext to subreports.
But they do not seem in the subreport.

when i click the detailband for expand the subreport , that's DrillDown
works but labels are not there :)

i am also sending my source code.

Can you help me ?

thanks
Recep Ayaz
--------------

//creating subreport
aSubReport := TppSubReport.Create(aReport);
aSubReport.Band := aReport.DetailBand;
aSubReport.CreateReport(aReport);
aSubReport.DataPipeline:= pPipeLine;

//creating child report
aChildReport := TppChildReport.Create(aSubReport);
aChildReport.DataPipeline := pPipeLine;
aChildReport.CreateDefaultBands;

aSubReport.DrillDownComponent := DbTexts[1];
aSubReport.Visible := true;

// label
aLabel := TppLabel.Create(aReport);
aLabel.Caption := aDataSet.Fields[i].DisplayLabel;
aLabel.Band := aChildReport.TitleBand;
aLabel.Left := left;
aLabel.Visible:=true;
aLabel.Font.Color := clWhite;
aLabel.Font.Size := 15;

Comments

  • edited June 2005

    This line creates the child report:

    aSubReport.CreateReport(aReport);

    You need to remove these lines

    //creating child report

    The childreport can be accessed via

    aChildReport := aSubreport.Report;




    --
    Nard Moseley
    Digital Metaphors Corporation
    http://www.digital-metaphors.com



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.