Problem with (child) sub-reports after Delphi 5 to Delphi 7 upgrade
Hi,
I hope someone can help me with the problem I am having after the upgrade.
We recently upgrade Delphi 5 to Delphi 7, along with Report Builder 4.x pro
to 7 standard.
We have one report that has 7 child sub-reports. These sub-reports has its
own Just In Time pipelines. These sub-reports print behavior are set to
child instead of section because these have the same page Header and Footer
bands.
This report works just fine under Delphi 5 but does not work correctly on
Delphi 7.
The sub-reports' Visible are controlled by user sub-report selection. What
I mean is that, user can select print any of the 7 sub-reports or all of
them.
I am currently running the reports with all of them turned on.
Here are the symptoms
1.
Each sub-report has its own sub-report page header to print the sub-report
title and column headings. This sub-report header is controlled by the
Break On Custom Field group option. When I compile this under Delphi 7, the
vary first sub-report is missing this sub-report group heading. The second
sub-report group heading prints just fine.
2.
Some of the sub-report just does not print at all, not even the report
header nor the footer.
The same code under Delphi 5 prints just fine. It just does not work
correctly under Delphi 7.
Any thoughts would be appreciated.
Thanks,
--
SeHun
I hope someone can help me with the problem I am having after the upgrade.
We recently upgrade Delphi 5 to Delphi 7, along with Report Builder 4.x pro
to 7 standard.
We have one report that has 7 child sub-reports. These sub-reports has its
own Just In Time pipelines. These sub-reports print behavior are set to
child instead of section because these have the same page Header and Footer
bands.
This report works just fine under Delphi 5 but does not work correctly on
Delphi 7.
The sub-reports' Visible are controlled by user sub-report selection. What
I mean is that, user can select print any of the 7 sub-reports or all of
them.
I am currently running the reports with all of them turned on.
Here are the symptoms
1.
Each sub-report has its own sub-report page header to print the sub-report
title and column headings. This sub-report header is controlled by the
Break On Custom Field group option. When I compile this under Delphi 7, the
vary first sub-report is missing this sub-report group heading. The second
sub-report group heading prints just fine.
2.
Some of the sub-report just does not print at all, not even the report
header nor the footer.
The same code under Delphi 5 prints just fine. It just does not work
correctly under Delphi 7.
Any thoughts would be appreciated.
Thanks,
--
SeHun
This discussion has been closed.
Comments
I do have the ShiftRelativeTo set correctly according the visiblity of
the sub reports. Also, the main report does not have anything but the
header/footer bands, and the 7 sub-reports on the detail band.
It seems like the vary first sub-report that does not have any records,
it makes all the sub-reports following that not to print. I have all
the sub-reports' pipelines.SkipWhenNoRecords set to false to print the
subreport with "no records for the report" printed.
I am running out of ideas to make it work with RB 7.
header and footer to print on every page. But, I still am not getting
the sub-report to print its data, even with the SkipOnNoRecords set to
FALSE. Also, it is printing a blank page (with the header and footer)
for the vary first page (the main report page).
The following article may contain some helpful information.
Also note that starting with RB 5.5, the DetailBand.DataPipeline was
deprecated.
--------------------------------------------------------------------
Article: Migrating Master/Detail reports from RB 5
--------------------------------------------------------------------
Starting with RB 5.5, the data traversal logic and report engine have been
enhanced to support the new DADE linking features and to improve the ability
of subreports to handle detail data.
In the past the subreport did NOT properly honor the detail datapipeline
SkipWhenNoRecords property. Now that this deficiency has been fixed it is
causing some confusion.
To convert old reports that use subreports to print detail data:
1. Set the detail DataPipeline.SkipWhenNoRecords property to False.
When SkipWhenNoRecords is False, master records that contain no detail data
will NOT be skipped and will appear in the report.
2. Use the default NoDataBehaviors property value of [ndBlankPage].
When ChildReport.NoDataBehaviors = [ndBlankPage], the subreport will simply
exit and not print if there is no detail data.
Note: The NoDataBehaviors property was added in RB 5.52 to provide better
control over how a report/subreport behaves when there is no data.
--
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
I did as 1. but I've changed 2. to ChildReport.NoDataBehaviors =
[ndBlankReport] becuase I want the sub-report to print even if it has no
data.
The page header and footer banners do print but none of the sub-report
components (not even the sub-report group header static labels) are
printing except for the first sub-report defined at the design time.
The first sub-report defined at the design time prints everything just
fine....
I've tried with ChildReport.NoDataBehaviors = [ndBlankReport,
ndMessageonPage]. With these options, if the sub-report datapipeline
does not have any data, "No Data Found" message do gets printed. But,
still no sub-report group headers. When the sub-report has data, I just
get a blank sub-report with just the page header and footer printed.
What could I be doing wrong?
Some more info on my report:
The main report does not have any pipeline linked to it. Only the
sub-reports have the pipelines.
Can you create a similar report using ReportBuilder and DBDemos. Email in
zip format to support@digital-metaphors.com and we can take a look at here.
--
Nard Moseley
Digital Metaphors Corporation
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com