Skip to Content
0
Former Member
Jul 22, 2008 at 10:54 AM

RAS SDK vb.net PROBLEMS.............

32 Views

Hi,

Maybe someone here can recognise the issue I'm having or has done something similar before.

I've been trying to access the databases and tables referenced in a number of reports.

I'm currently running VS2003 with .NET framework 1.1 and programming in VB.NET.

The crystal enterprise installation is CE9.

I've created a windows project and coded the following, however, I cannot access the database or table information. Whenever I try to get the myreportclientdocument.DataDefinition or myreportClientDocument.Database information, it just returns that information for the type of 'DataDefinition' has not been loaded into the runtime.

Imports Crystaldecisions.Enterprise

Imports CrystalDEcisions.ReportAppServer.ClientDoc

Imports CrystalDecisions.ReportAppServer.Controllers

Public Class Form1

Inherits System.Windows.Forms.Form

#Region "Windows Form Designer Generated Code "

Public Sub New()

mybase.new()

initializecomponent()

end sub

Private Sub Button1_Click(byval sender as system.object, byval e as system.eventargs) handles button1.click

dim servername as string = "servername"

dim mysessionmgr as sessionmgr = new sessionmgr

dim myenterprisesession as enterprisesession = mysessionmgr.logon("Administrator", "password", servername, "secEnterprise")

Dim myEnterpriseService as enterpriseservice = myenterprisesession.getservice("InfoStore")

Dim myInfoStore as InfoStore = New Infostore(myenterpriseservice)

myenterpriseservice = myenterprisesession.getservice("RASReportFactory")

Dim rrfObject as object = myEnterpriseSErvice.Interface

Dim myReportAppFactory as ReportAppFactory = CType(rrfObject, ReportAppFactory)

Dim QuerySTring as string = "select top 2000 SI_ID, SI_NAME, SI_PARENTID FROM CI_INFOOBJECTS WHERE SI_PROGID = 'crystalenterprise.report'"

Dim myinfoobjects as infoobjects = myInfoStore.Query(querystring)

Dim myInfoObject as Infoobject = myInfoobjects(2)

Dim MyReportclientdocument as reportclientdocument = new ReportClientDocumentClass

myReportClientDocument = myReportAppFactory.OpenDocument(myInfoobject.ID, 0)

'THIS IS WHERE I CANNOT SEEM TO GET ANY INFORMATION OF THE

'DATABASE AND STORED PROCs or TABLES USED

End Sub

End Class

Any suggestions?

btw, the references I have are:

crystaldecisions.shared

crystaldecisions.windows.forms

crystaldecisions.reportsource

crystaldecisions.reportappserver.reportdefmodel

crystaldecisions.reportappserver.datadefmodel

crystaldecisions.reportappserver.controllers

crystaldecisions.reportappserver.clientdoc

crystaldecisions.enterprise.infostore

crystaldecisions.enterprise.framework

Please help!!!!!