Home Subreports

UnloadSubReport

edited September 2002 in Subreports
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.

Comments

  • edited September 2002
    If you are only worried about streaming the subreport down, and since the
    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

This discussion has been closed.