Sql – Error Opening CrystalReport viewer

crystal-reportssql-server-2005sql-server-2005-express

I have this problem which I am trying to debug for a lot of time.

The setup is like this:

i. The application is a Windows application developed using VS2005, .net 2.0.

ii. I use the Cyrstal reports component Crystal Report Viewer and dynamically display various reports in the same form.

iii. The db is SQLSERVER Express 2005 and situated on a different machine.

When I run the application on the db server, I am able to view the report. However, when I run the application on a different machine which is connected to the above dbServer, I get an error. ( I dont get this error on my dev setup)

Source: CrystakReprotViewer.CS:SendDBLogonForReport() Details:Logon failed.
Details: ADO Error Code: 0x
Source: Microsoft OLE DB Provider for SQL Server
Description: [DBNETLIB][ConnectionOpen (Invalid Instance()).]Invalid connection.
SQL State: 08001
Native Error:
Error in File C:\DOCUME~1\admin\LOCALS~1\Temp\ActionPoints {52820D22-199C-4D46-A76B-70A55D9F54D5}.rpt:
Unable to connect: incorrect log on parameters. at CrystalDecisions.ReportAppServer.Controllers.DatabaseControllerClass.SetTableLocation(ISCRTable CurTable, ISCRTable NewTable)
at CrystalDecisions.CrystalReports.Engine.Table.set_Location(String value)
at Trivalve.UI.Client.Reports.CrystalViewer.CrystalReportViewer.SetDBLogonForReport(ConnectionInfo connectionInfo, ReportDocument reportDocument) in D:\Ramjee\Work\Projects\Trivalve\Trivalve\src\tfssetup\2008\Trivalve_2008\Trivalve\Reports\CrystalViewer\CrystalReportViewer.cs:line 127 rptcontrollers.dll SetTableLocation

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Thanks,
Ramjee

Best Answer

Use datasource=servername or ip address\instance name if available,port number

Default port number is 1433 or 1434

My problem was solved with this. Posting for the use of others.