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

Problem with subreports in code

edited January 2002 in General
Hi People,

I used the code described at the news about tech tips -"Create
subreports in code" - but I got a problem when the "printBehavior" was set
to "btSection". My components created at title band simply didn't appear.
What can be wrong?
P.S.: I added my code below.


lSubReport0 := TppSubReport.Create(Self);
lSubReport0.PrintBehavior := pbSection;
lSubReport0.ParentPrinterSetup := FALSE;
lSubReport0.ResetPageNo := FALSE;
lSubReport0.TraverseAllData := FALSE;

lSubReport0.Band := ppReport1.DetailBand;
lSubReport0.CreateReport(ppReport1);

lReport0 := TppChildReport(lSubReport0.Report);
lReport0.OnEndFirstPass := lReport0EndFirstPass;
lReport0.AutoStop := FALSE;

lReport0.DataPipeline := ppBDEPipeline1;
lReport0.CreateDefaultBands;

lLabel2 := TppLabel.Create(Self);
lLabel2.Band := lReport0.TitleBand;
lLabel2.Caption := 'Nepomuceno';

Comments

This discussion has been closed.