Skip to Content
Former Member
Mar 02, 2015 at 05:06 PM

Error: Public member 'Dispose' on type 'ISCDReportClientDocument' not found.


Hi everyone,

I have an ASP VB.NET web application developed in Visual Studio 2010 4.0 loaded on server A making a call to server B running Crystal reports 2013. I want to use the same Viewer and use Case to pass the name of the report. But I can’t Dispose of the document I am getting an error: Public member 'Dispose' on type 'ISCDReportClientDocument' not found. I would appropriate any help on this one because I am stuck.

Here is my code:

Public Class GLReports

Inherits System.Web.UI.Page

Private boEnterpriseSession As EnterpriseSession

Private boInfoObject As InfoObject

Private boReportClientDocument As ReportClientDocument

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

If Session("UserID") Is Nothing Then Response.Redirect("..\Login.aspx")

Dim blnIsError As Boolean = False


Dim boSessionMgr As SessionMgr

Dim boInfoStore As InfoStore

Dim boEnterpriseService As EnterpriseService

Dim boInfoObjects As InfoObjects

Dim boReportName As String = Request("FormName")

Dim boQuery As String

Dim boReportAppFactory As ReportAppFactory

If Session("boEnterpriseSession") IsNot Nothing Then

boEnterpriseSession = DirectCast(Session("boEnterpriseSession"), EnterpriseSession)


boSessionMgr = New CrystalDecisions.Enterprise.SessionMgr()

boEnterpriseSession = boSessionMgr.Logon("username ", " password ", " cms ", " authtype ")

Session.Add("boEnterpriseSession", boEnterpriseSession)

End If

If Session("boReportClientDocument") IsNot Nothing Then

boReportClientDocument = DirectCast(Session("boReportClientDocument"), ReportClientDocument)


boEnterpriseService = boEnterpriseSession.GetService("", "InfoStore")

boInfoStore = New CrystalDecisions.Enterprise.InfoStore(boEnterpriseService)

Select Case boReportName

Case "Test1"

boReportName = "rptTest1.rpt"

Case "Test2"

boReportName = " rptTest2.rpt "

End Select

boQuery = "Select Query"

boInfoObjects = boInfoStore.Query(boQuery)

boInfoObject = boInfoObjects(1)

boEnterpriseService = Nothing

'Retrieve the RASReportFactory

boEnterpriseService = boEnterpriseSession.GetService("RASReportFactory")

boReportAppFactory = DirectCast(boEnterpriseService.[Interface], CrystalDecisions.ReportAppServer.ClientDoc.ReportAppFactory)

'Open the report from Enterprise

boReportClientDocument = boReportAppFactory.OpenDocument(boInfoObject.ID, 0)

'Add the reportClientDocument to session

Session.Add("boReportClientDocument", boReportClientDocument)

End If

'Set the ReportSource of the viewer to the report in Session

CRViewer.ReportSource = Session("boReportClientDocument")



Catch ex As Exception

blnIsError = True 'if any error occured then no need to udpate the batch status

lblMessage.Text = "Error, " & ex.Message

lblMessage.ForeColor = System.Drawing.ColorTranslator.FromHtml("Red")


End Try

End Sub

End Class