How to dispose report properly after returning the it in OnCreateReportHandler?

Posted by: truong.dam on 22 May 2025, 4:30 am EST

  • Posted 22 May 2025, 4:30 am EST - Updated 22 May 2025, 4:32 am EST

    Hi, my name is Truong.

    Currently our product is using Active Report 12.3 in ASP.NET 4.8 to creating and viewing reports.

    I realized that the SectionReport return by OnCreateReportHandler seem not to be disposed at all. The app memory size keep inscreasing whenever I’m creating new report from 300mb to 4gb after 4, 5 heavy report and it still keeping those reports in memory even after 1 hour of inactivity.

    protected override object OnCreateReportHandler(string sReportRunOptions)

    This code will return to OnCreateReportHandler in which will return as Object:

    reportRunValue.BranchId = item;
    using (ProfitDetailed rptDetailed = new ProfitDetailed(reportRunValue,....))
    {
        rptDetailed.Run();
        
        for (int i = 0; i < rptDetailed.Document.Pages.Count; i++)
        {
            rptFinal.Document.Pages.Add(rptDetailed.Document.Pages[i]);
        }
    }
    return rptFinal;
  • Posted 25 May 2025, 11:13 pm EST

    Hi Truong,

    Unfortunately, ActiveReports 12 is a legacy version of ActiveReports and we no longer support the same, we’ll recommend you upgrade to the latest version of ActiveReports i.e. v19 for many new feature, bug fixes and prompt support.

    You can download and try the latest version from here: https://developer.mescius.com/activereportsnet/download

    Regards,

    Anand

  • Posted 25 May 2025, 11:26 pm EST

    We also has Active Report 19. We’re going to implement it, any advice?

  • Posted 28 May 2025, 11:37 pm EST

    Hi Truong,

    Over the years, ActiveReports has improved the performance of both the Report types, so just by upgrading, you should see some performance improvement.

    However, if you’re working with SectionReports, then we’ll also recommend checking out https://developer.mescius.com/activereportsnet/docs/latest/online/optimize-section-reports.html to learn about how to optimize your SectionReport for the best performance.

    Regards,

    Anand

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels