Problem with subreports in code
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';
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';
This discussion has been closed.
Comments
6.03.
Contact info@digital-metaphors.com with your full registration information.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com