locked
Attempted to read or write protected memory issue RRS feed

  • Question

  • User-1717161486 posted

    Hi,

    I have added a Crystal Report Viewer in my Custom Report page. I'm using Data Set as a data source. The page is loading fine with report data first time. I When i click the next page button it is started loading the report forever. I could not stop the loading. When i refresh the page i'm getting the following error message.

    Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

    My page has 4 check boxes with different Report name. Based on the Report check box selection, first i'm loading the Data set then assigning into Crystal Report Viewer. First time the report loading fine(with the paging issue). When i select the next report check box and load the report, i'm getting the same error.

    Please help me to fix this issue.

    Wednesday, July 16, 2014 3:34 PM

All replies

  • User-929656654 posted

    Please post the piece of code that assigns the recordset to Crystal report. This will help the members to give you the answer. Looks like this is memory allocation and clear related problem. However the code that loads the report is required to dig more into the problem that you are facing.

    Thursday, July 17, 2014 1:43 AM
  • User-1717161486 posted

    here is code which bind the dataset on CRV.

    string reportPath = string.Empty;
    reportPath = Server.MapPath("/CR_Reports/CustomReportDesignWith10Columns.rpt");
    _logObj.Debug("Report Path :" + reportPath);
    reportDocument.Load(reportPath);
    reportDocument.SetDataSource(ds);
    CustomReportViewer.Visible = true;
    Session["CrystalReportSource"] = reportDocument;
    CustomReportViewer.ReportSource = reportDocument;

    Thursday, July 17, 2014 8:50 AM