cancel
Showing results for 
Search instead for 
Did you mean: 

VS2008 and Crystal Reports Server 2008

Former Member
0 Kudos

Hi,

I am trying to connect to CR Server 2008 using the following VB.Net code but keep getting the following exception: Could not load file or assembly 'BusinessObjects.Enterprise.Sdk, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified. I have installed the CR Server 2008 Client Tools.

Where can i get the above dll?

Below is the code i'm using and i have highlighted the line that generates the error.

Try
            Dim serverName As String = "servername"
            Dim mySessionMgr As SessionMgr = New SessionMgr()

            'Logon to the enterprise box
            Dim myEnterpriseSession As EnterpriseSession = mySessionMgr.Logon("Administrator", "pwd", serverName, "secEnterprise")

            'Exception raised at line below
            Dim myEnterpriseService As EnterpriseService = myEnterpriseSession.GetService("InfoStore")

            Dim myInfoStore As InfoStore = New InfoStore(myEnterpriseService)

            myEnterpriseService = myEnterpriseSession.GetService("PSReportFactory")

            Dim psrfObject As Object = myEnterpriseService.Interface
            Dim myPSReportFactory As PSReportFactory = CType(psrfObject, PSReportFactory)
            Dim queryString As String = "Select 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(1)
            Dim myReportSource As ReportSource = myPSReportFactory.OpenReportSource(myInfoObject.ID)
        Catch ex As Exception
            strMsg = ex.Message
        End Try

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Added Doamin Name and Auth type but still getting an error. I've got more details on the error -

login exception (Error: FWM 01009) - Communication error occurred when trying to connect to server XXXX (FWM 01009) socket() failed: java.net.NoRouteToHostException: No route to host: connect - Communication error occurred when trying to connect to server XXXX (FWM 01009) - com.crystaldecisions.sdk.exception.SDKException$OCAFramework

Edited by: spb123 on Apr 6, 2009 7:38 PM

daniel_paulsen
Active Contributor
0 Kudos

hmmm..."No route to host exception"

sounds like a failure for the web services to connect to the CMS. Try using the machine name instead of localhost for the Session URL.

Also, is this a multi-homed machine (multiple nics). If so, make sure the nic with the IP the CMS is using is at the top of the binding order.

if developing with the 2.0 .net framework, ensure the assemblies you added for the DSWS consumer dlls are from the dswsDotNet2Api folder, otherwise use the dlls in the dswsDotNetApi folder for 1.1 framework applications.

the source code looks correct

Answers (3)

Answers (3)

Former Member
0 Kudos

Dan,

Yes the web services are on the same box as the application. Browsing to - http://localhost:8080/dswsbobje/services/Session?wsdl returns the Session wsdl in the browser.

For the domain name, should it be the full machine name?

Thanks

Sean-Paul

daniel_paulsen
Active Contributor
0 Kudos

typically, the DomainName is simply the NetBios name of the machine (this should suffice with everything on the same box) if it fails, try the fully qualified name.

I've also noticed you do not provide the authentication type for the enterprisecredential (secWinAD, secEnterprise etc.) be sure to add this as well.

by default the domainname and authentication type should be the local machine name and secEnterprise, so in theory, you should be able to create the enterprisecredential by passing only the username and password if secenterprise is being used.

Former Member
0 Kudos

Thanks Dan for the update. Are there any sample of using the web services to connect to CR Server 2008 to display a report?

I have tried using the following code that i got in the Business Objects Web Service Developer Guide and populating with login credentials:


try
            {
                 Connection boConnection = new Connection("http://localhost:8080/dswsbobje/services/Session");
                 EnterpriseCredential boCredential = new EnterpriseCredential();
                 boCredential.Login = "username";
                 boCredential.Password = "password";
                 boCredential.Domain = "domain";
                 Session boSession = new Session(boConnection);
                 SessionInfo boSI = boSession.Login(boCredential);
            }
            catch(DSWSException exc)
            {
                Label1.Text = exc.ToString();
            }

but keep getting the error - login exception (Error: FWM 01003) when executing the line boSession.Login(boCredential);

daniel_paulsen
Active Contributor
0 Kudos

LocalHost assumes that the web services are installed on the same machine as your application. Is this the case? Also note that the Web Service providers are running on a Java server, so the URLs are case sensitive.

you can test by using http://localhost:8080/dswsbobje/services/Session?wsdl in a browser to see if the wsdl returns.

Also, another common mistake is that the boCredential.Domain is not your network domain name, but the name of the server hosting the CMS.

also verify that the web services are installed by going to: http://localhost:8080/dswsbobje/services/

this should list each of the available web services

Dan

Former Member
0 Kudos

I have since read a few post's which say to install Crystal Reports 2008 Service Pack 1. However, when you go to the 'Crystal Reports 2008 Service Pack Reference' page (https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/webcontent/uuid/90d7dc4e-36ce-2b10-d2b3-d5d72d067e21 [original link is broken]) you are unable to download the incremental service pack 1.

Is there any where else that this can be downloaded?

Thanks

daniel_paulsen
Active Contributor
0 Kudos

you will not be able to apply Crystal Reports 2008 SP1 to CR Server 2008. You will need CR Server SP1 which has not yet released, but should be available in this quarter (Q2 '09).

Currently, the only way to connect to CR Server using .NET is through web services.

0 Kudos

Hi all,

There have been a few compatability issues when installing SP1 on top of or the system may have access to SP0 and CR Server.

The install team is adding checks so the installer will check and notify if they are found. Check back daily for the updated SP.

Thank you and sorry for the inconvenience.

Don

former_member184995
Active Contributor
0 Kudos

What Dan stated is correct.

You will need to wait for Service Pack 1 for Crystal Reports Server, which has not been released.

Don is speaking of the Crystal Reports SP1, which will not work with CR Server.

Jason