Section subreport
Hi,
I'm using Delphi7 and RB 7.01 now. I have a report structure like this: In
the details from the Main Report(No DataPipeline), there are 4 SECTION style
supreports: Subreport1(DataPipeline1), Subreport2(No DataPipeline),
Subreport3(DataPipeline2), Subreport4(DataPipeline3). If I hide Subreport3
and Subreport4, the report engine does print the report correctly
(MainReport, Subreport1 and Subreport2). The problem I have is that if I
hide Subreport1 and Subreport2, then the report engine prints like:
MainReport, BLANK PAGE, Subreport3 and Subreport4
if I ask to print them all (all subreports are visible), it does print
MainReport, Subreport1, Subreport2, Subreport3 and Subreport4, Obviously I
don't have any code to ask to print a blank page. so where is this blank
page comes from?
Thanks
William
I'm using Delphi7 and RB 7.01 now. I have a report structure like this: In
the details from the Main Report(No DataPipeline), there are 4 SECTION style
supreports: Subreport1(DataPipeline1), Subreport2(No DataPipeline),
Subreport3(DataPipeline2), Subreport4(DataPipeline3). If I hide Subreport3
and Subreport4, the report engine does print the report correctly
(MainReport, Subreport1 and Subreport2). The problem I have is that if I
hide Subreport1 and Subreport2, then the report engine prints like:
MainReport, BLANK PAGE, Subreport3 and Subreport4
if I ask to print them all (all subreports are visible), it does print
MainReport, Subreport1, Subreport2, Subreport3 and Subreport4, Obviously I
don't have any code to ask to print a blank page. so where is this blank
page comes from?
Thanks
William
This discussion has been closed.
Comments
As a test try creating a new report that contains only main, subreport3 and
subreport4. Does that print correctly?
Is there anything in subreport3 that would cause a page break - a start new
page group perhaps or a title band.
Try setting the Visibility prior to calling Report.Print.
--
Nard Moseley
Digital Metaphors
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
As I said, I don't have anything would cause a page break. otherwise
printing all of them together would have problem, which I don't have, what I
did is wrote the RAP code in the Report.BeforePrint:
if Condition then
begin
Subreport1.Visible := True;
Subreport2.Visible := True;
Subreport3.Visible := False;
Subreport4.Visible := False;
end
else
begin
Subreport1.Visible := False;
Subreport2.Visible := False;
Subreport3.Visible := True;
Subreport4.Visible := True;
end;
NOW, I found where the problem is, Since every report has a footer with a
PageSetDesc system variable(Sorry, not metion it in my previous message), In
order to make the report engine won't print a blank page, I have to make the
footer of Main report to INVISIBLE!.
This is not good, and I think this is a BUG! Please let me if there is a
workaround.
William
Try modeling the report a slightly different way.
Create a main report that has only a detail band - no header or footer.
Use a section style subreport to print the first page. (this will be what is
now the first page).
Then print the remaining section subreports (1, 2, 3, 4).
--
Nard Moseley
Digital Metaphors
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
It worked!!!, Thanks a lot. BTW, Why could it happen?
William
The recommended method of modeling the output you require is to use the
approach that I suggested.
If the main report has a footer and contains section, there may be a
tendency for the generating process to get confused on what
report/childreport is in control of a page. In other words the concept of
page is getting confused. By using a main report with only a detail band,
the main report will act as a driver and will not have any pages to
produced.
--
Nard Moseley
Digital Metaphors
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com