5. Dynamic Subreport Loading demo - RB7/D6
In a thread from 2002/07/12 (Dynamic Loading Subreports from a
database) a problem with this demo was acknowledged for 6.03. I have
now upgraded to 7 and I still get it.
I wish to use this feature - is there a patch available?
Thanks,
Rick Matthews
Dartek Systems Inc.
database) a problem with this demo was acknowledged for 6.03. I have
now upgraded to 7 and I still get it.
I wish to use this feature - is there a patch available?
Thanks,
Rick Matthews
Dartek Systems Inc.
This discussion has been closed.
Comments
not the same as the one where the template is located. Thus, when the report
explorer tries to load the template, it fails because it assumes that it is
located in correct folder. What you can do is tell the report explorer not
to load the template, since it relies on the folder id, and let the template
locate the report template from the item pipeline using the entire item
dataset.
When the subreport template is loaded in the TmyDynamicLoadingSubreport
methods, temporarily nil out the method pointer for reOnLocateRecord on the
template and then make the call to LoadFromDatabase.
var
...
lSavedReportExplorerEventHandler: TppLocateEvent;
begin
...
lSavedReportExplorerEventHandler := Report.Template.reOnLocateRecord;
Report.Template.reOnLocateRecord := nil;
Report.Template.LoadFromDatabase;
Report.Template.reOnLocateRecord := lSavedReportExplorerEventHandler;
...
Thanks for reporting the issue and sorry it wasn't included in the latest
release.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
I put the code in the LoadFooterSubreport proc, opened the report,
switched to the dynamic footer template tab and then clicked preview.
This time it did find the template and ran correctly.
I then clicked close and I get an AV in:
procedure TppRuler.ClearGuides;
begin
{erase current guide}
DrawGuide(FGuide1X, FGuide1Y); <== here
Thanks,
loading of a subreport template while the main report is generating is
definitely pushing the envelope. I'll post the results of our findings here.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com