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

Subreports with datapipelines in one band

edited October 2003 in Subreports
I have a dynamic array of pipelines and want to have a subreport for each
of these pipelines. All the subreports should appear in the detail band
(Valueband) of the mainreport.

When I do this with this code:

SubReport := TppSubReport(ppComponentCreate(StandardReport,
Tppsubreport));
SubReport.Band := ValueBand;

SubReport.CreateReport(StandardReport);
SubReport.ParentWidth := true;
SubReport.PrintBehavior := pbChild;
SubReport.Visible := true;

NewChildReport := TppChildReport(SubReport.Report);
NewChildReport.DefaultBands := [btTitle, btDetail];
NewChildReport.CreateDefaultBands;

NewChildReport.TitleBand.PrintHeight := phDynamic;
NewChildReport.TitleBand.BottomOffset := 5;

SubReport.DataPipeline := FResultPipelineArray[i];

only the first subreport appears. When the Datapipeline of each subreport
is nil, then it works well.

I tried to set NewChildReport.DataPipeline but it doesn't help anything.

Where is the issue?

Christine

Comments

  • edited October 2003

    For each subreport after the first, you need to set up a ShiftRelativeTo
    relationship with the subreport directly above.

    SubReportN.ShiftRelativeTo := SubReportN-1;




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

    Best regards,

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