UnloadSubReport
When I preview my dynamically loaded subreport and then save the report, the
subreport will be stored inside the main reports rtm file as well. So I
created a UnloadSubReport method but I am not quite sure where I should call
this. If I put it in the EndOfMainReport it is only called when and if I
preview the last page. I want it to be called just before the main report is
saved.
Any suggestions ?
Thanks,
Samuel.
subreport will be stored inside the main reports rtm file as well. So I
created a UnloadSubReport method but I am not quite sure where I should call
this. If I put it in the EndOfMainReport it is only called when and if I
preview the last page. I want it to be called just before the main report is
saved.
Any suggestions ?
Thanks,
Samuel.
This discussion has been closed.
Comments
subreport is loaded dynamically, then you should be able to unload (free)
the subreport in the Report.Template.OnSaveStart event. Then perform a
report object loop to find the subreport components by class type and then
unload the subreport. You can call Subreport.CreateReport(MainReport) to
create a new one in place of the one you just freed.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com