SAP Knowledge Base Article - Public

1790952 - ErrorMsg:"Data Object cannot be opened/accessed" after upgrading application from BOE 3.1 to BI 4.0 runtime

Symptom

Application that previously worked on BOE 3.1 and VS 2008 with IIS 6 was upgraded to BI 4.0 and VS 2010 and IIS 6 began throwing errors.

In a Managed .NET application connecting to BI 4.0 RAS Server after a while, can vary from a few hours to a few days, this error would be generated in the RAS logs:

ErrorMsg:"Data Object cannot be opened/accessed"


 

Environment

  • BI 4.0 on Windows 2008 Server
  • BI 4.0 .NET SDK installed on application server BI 4.0 runtime version 14.x.x.x
  • IIS 6.0 on Windows 2003 Server
  • Crystal Reports 2011
  • Visual Studio 2010

 

Reproducing the Issue

Application would send multiple report job requests off to the BI 4.0 RAS Server to process and export

After a few days or a few hours the RAS Server would become unresponsive and a restart was required of SIA Service had to be done to restore usability

Cause

With changes to the BI 4.0 Server and Services it was determined that the Report Job requests were not being close and disposed of in the Session

As well as the Sessions were not being released thus the default 20 minute timeout had to pass before the job was released from memory.

It was also determined the Report objects were not being closed and disposed of in code.

Resolution

Multiple configuration options were tried and optimized as follows, and note this can be adjusted for each unique configuration determined by the load and work flow of the users and application:

  1. Log into the CMS -> Select Servers -> Crystal Reports Servers
  2. Double click on the Report Application Server -> Properties
  3. Set the "Oldest on-demand data given to a client (minutes): to zero ( this disables report caching )
  4. Set "Idle Connection Timeout (minutes): 30 ( determined to be optimal for this application and work flow )
  5. IIS Session time out was set to 40 minutes
  6. CMS - RAS server Metrics showed there were very few Report active while processing according to metric_currentagentthreadcount.

Also for the SIA to manage the high number of report job requests 2 more RAS Servers were Cloned. This also can be adjusted accordingly.

Code changes to the application as follows: 

View Report - On page load event:

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        CRReportViewerId.HasToggleGroupTreeButton = False
        CRReportViewerId.HasToggleParameterPanelButton = False
        CRReportViewerId.EnterpriseLogon = Session("cssession")
 ...
        myReportClientDocument = CType(Session("RptClientdocument"), CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocument)
        CRReportViewerId.ReportSource = myReportClientDocument

        cssession = Session("cssession")

    End Sub

On page unload event:

    Protected Sub Page_Unload(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Unload
        cssession.Logoff()
        CRReportViewerId = Nothing
        GC.Collect

    End Sub

Keywords

Crystal Reports, BI 4.0 SDK , KBA , BI-DEV-NET , BI Software Development Kits (SDKs) - .NET or Other , Problem

Product

SAP Crystal Reports, developer version for Microsoft Visual Studio