RDLC Report's: Continuous Memory Consumption RRS feed

  • Question

  • Hello,

    We have one web application (.Net Framework 4.0, visual studio 2010) having form which uses rdlc report viewer and user can select some input parameters and click on show report button.

    But, every time when user clicks on button to fetch the report OR even if I refresh the page OR do page navigation into the report viewer control then also it keeps on consuming memory and does not come down at all.

    If there are 15 users at a time accessing the web report then memory usage goes beyond 1GB and so.

    And sometime during the day memory gets overflowed.

    During the investigation I found that the report viewer control is really consuming lot of memory each time I fetch the report.

    Following is the code snippet showing the way it is binded/used

    private void ShowCustomerListReport()
    List<ReportCustomerListDTO> dataForReport = GetCustomerList();

    if (dataForReport != null && dataForReport.Count > 0)

    this.ReportViewer1.LocalReport.ReportPath = @"..\Reports\CustomerListForPeriod.rdlc";

    this.ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("ReportCustomerListDataSet",

    ReportParameter p1 = new ReportParameter("DateFrom", txtFromDate.Text.Trim().ToString());
    ReportParameter p2 = new ReportParameter("DateTo", txtToDate.Text.Trim().ToString());
    ReportParameter p3 = new ReportParameter("CurrentDate", DateTime.Now.ToShortDateString());

    this.ReportViewer1.LocalReport.SetParameters(new ReportParameter[] { p1, p2, p3 });

    pnlCustomerList.Visible = false;

    Could you please do the needful for this.

    I have already checked all the probable things like session/static things etc. But did not get any clue yet.

    I also tried to keep the process as it as for about 16hours hoping that GC will reclaim the memory when it will run, but there was no luck, memory was not released at all.


    Rohit Rokade

    • Edited by RohitRokade Tuesday, November 25, 2014 8:03 AM
    Tuesday, November 25, 2014 4:20 AM