cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with dynamic data source in VB.Net 2005

Former Member
0 Kudos

On my dev pc I have set up several Crystal Reports against a dev MS SQL Express server (let's call it ServerA) using Database Type OLE DB (ADO) with a provider of SQLODEDB. I run into issues when trying to programmatically connect to a different MS SQL Express server (let's call it ServerB).

1)     Dim rptToView As New CrystalDecisions.CrystalReports.Engine.ReportDocument()

2)     rptToView.Load(Application.StartupPath & "\" & ReportName)

3)     For i As Integer = 0 To rptToView.DataSourceConnections.Count - 1

4)          rptToView.DataSourceConnections.Item(i).SetConnection(ServerName, DatabaseName, UserID, Password)

5)     Next

If both databases are up and running the code will load the report and then setconnection to ServerB very quickly. However, If ServerA is turned off then the .load command (line 2 in the code above) takes forever before finally progressing to the setconnection command. Clearly the report, which was created against ServerA, is trying to connect to ServerA and timing out before even giving me a chance to redirect it to ServerB. This application will be distributed to a number of different locations with different databases.

I need a way of preventing the report from automatically trying to connect to the development server before I can programmatically redirect it to the production server.

Thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

What is the version of the CR assemblies referenced in your project?

- Ludek

Former Member
0 Kudos

10.2.3600.0

former_member183750
Active Contributor
0 Kudos

Make sure you are using SP 1 for CR 10.2:

https://smpdl.sap-ag.de/~sapidp/012002523100006007872008E/crvs05sp1.exe

If that does not resolve the issue, contact sales (866-681-3435) and ask for an eval of CR 2008, see if the issue is present there. Please note that there are no more Service Packs planned for CR 10.2 and an upgrade to CR 12.x or Crystal Reports for Visual Studio 2010 may have to be done.

- Ludek

Former Member
0 Kudos

This seems to have worked.

As a note to anyone else finding this topic later after installing SP1 I had to manually edit the form designer to make record selection formulas to work again.

http://scn.sap.com/message/8179989#8179989

Answers (0)