Dynamic subreports problem
I am using dynamically loading subreports to chain together a few separate
reports. The individual reports are quite substantial in their own right and
can be printed separately. It works fine except when there is a subreport
inside one of the reports being loaded. I tried it with the RB demo as well
(see RBuilder\Demos\3.End User\5. Dynamic subreport Loading) and I get an AV
there as well. I just put an empty subreport in the "myTitleTemplate" and
the problem appears (the mySettings.ini has to be set to get the reports
from the DB)
Any ideas?
Thanks
Yannis
reports. The individual reports are quite substantial in their own right and
can be printed separately. It works fine except when there is a subreport
inside one of the reports being loaded. I tried it with the RB demo as well
(see RBuilder\Demos\3.End User\5. Dynamic subreport Loading) and I get an AV
there as well. I just put an empty subreport in the "myTitleTemplate" and
the problem appears (the mySettings.ini has to be set to get the reports
from the DB)
Any ideas?
Thanks
Yannis
This discussion has been closed.
Comments
If you are using an older version of RB, then try modifying the code in the
demo to look like this in the LoadSubreport procedure:
procedure TmyDynamicLoadingSubReport.LoadSubreport;
begin
if (Band is TppTitleBand) then
LoadTitleSubreport
else if (Band is TppHeaderBand) then
LoadHeaderSubreport
else if (Band is TppFooterBand) then
LoadFooterSubreport;
Report.Engine.State := Report.Engine.State - [esInitialized];
Init;
end; { procedure, LoadSubreport }
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
I have downloaded the latest version 7.03 and I noticed in the eample 2
differences.
1. There is nothing but the loading of subreports in the LoadSubreport
procedure, and
2. In the StartOfMainReport the call to "inherited StartOfMainReport;" is
AFTER the LoadSubReport (in previous version it was BEFORE).
Following the current example everything works fine
Thanks
Yannis
in a couple changes to the Dynamic Subreport Loading demo.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com