cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports not working on client

Former Member
0 Kudos

I've created a windows forms program with vb.net on visual studio 2011. I downloaded the crystal reports version for VS 2011. Installed it and made a wonderful crystal report on my machine. The reports is using a connection with my SQL Server 2008 R2 to get the information that the report is showing. On my machine, everything is working great.

My problem isn't with my own machine. It happens after I publish my program and load it on a client computer. Everything else in the program works great, but every time the crystal report gets brought up, the server name is there. The username and password are there (in the program versions that i coded all that in) but the database name itself is missing.

I've tried to hard code in all the information that i needed to get this to work. I have also tried to use VS 2011's way of selecting the report, which just consists of adding a CR viewer and clicking to find/add the report to the viewer. Nothing works for the client computers.

My question is this, How do I get my client computer's Crystal Report program to connect to the database so that we can make/use/print a report?

Accepted Solutions (1)

Accepted Solutions (1)

former_member188030
Active Contributor
0 Kudos

Hi,

I am assuming that you are using Visual Studio 2010 and CR for VS 2010.

Few steps to try -

- See if the client machine is able to connect to the database which the report is connecting to at the design time, i.e. the machine should be able to access the database.

- If the report used ODBC conenction, check if the DSN exists on the client machine connecting to the database.

- Check the provider / driver used while designing the report to connect to the database (SQL native client, SQL server, etc), see if it is installed on the client machine, if it is not, install it.

- Above information can be found by the 'SetDataSource Location' option in the report designer.

- If you are trying to connect to a different database than the one which report connects to at design time, you will have to change the code accordingly to change the database of the report at runtime.

Hope it helps,

Bhushan.

Former Member
0 Kudos

I meant to type VS 2010. Sorry. You assume correctly. As for everything else, here goes....

Client machines can connect to database, because it is the same database that I am running for the rest of my program. The crystal reports are actually just a side thing on my program. So... connection to the database from client machine : Check

Using an OLE DB connection, so that's answered.

I made sure that the program is adding in anything i can get from SQL Server with the prerequisites after the 7 th time failing. (Up to 13 fails now to connect)

Set Datasource Location Properties:

Database Type: OLE DB (ADO)

Provider: SQLNCLI10

Data Source: AURORA103255\STEWARTRBROWNE

Initial catalog: dbSRB

User ID:

Integrated Security: True -Just to let you know, have set this between true and false on different versions-

Use DSN Default Properties: False

Locale Identifier: 1033

Connect Timeout: 15

General Timeout: 0

OLE DB Services: -5

Current Language:

Auto Translate: -1

Initial File Name:

Use Encryption for Data: 0

Replication server name connect option:

Tag with column collation when possible: 0

MARS Connection: 0

Failover Partner:

DataTypeCompatibility: 0

Trust Server Certificate: 0

Server SPN:

Failover Partner SPN:

Anything else I can do to help you help me?

former_member188030
Active Contributor
0 Kudos

Hi,

Check if SQLNCLI10 (SQL NAive client is installed on the client machine.

Use [Modules|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/22316] utility to check the environment differences between the dev and the client machine.

Take a look at the below article

[Troubleshooting Guide to Database Connectivity Issues with Crystal Reports in Visual Studio .NET Applications|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b0225775-88c4-2c10-bd80-8298769293de]

Also a test app using below code snippet would be useful.

using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using CrystalDecisions.Web;

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
        ReportDocument rd = new ReportDocument();
       rd.Load(Server.MapPath("Report1.rpt"));
       rd.SetDatabaseLogon("User", "Password", "Server", "Database");
       CrystalReportViewer1.ReportSource = rd;        
    }    
}

Hope this helps,

Bhushan.

Edited by: Bhushan Hyalij on Dec 2, 2011 6:58 PM

Former Member
0 Kudos

Sorry it took me so long to reply. I was working through everything you gave me. The troubleshooting guide helped tremendously with the module program. It turns out that my program was sending out the wrong SQL Server service pack with my program. It is fixed now and working beautifully. Thanks Bhushan

Answers (1)

Answers (1)

former_member183750
Active Contributor
0 Kudos

Depends on the SDK you are using. For the plain CR SDK see the sample app vbnet_win_dbengine.zip at the following location:

http://wiki.sdn.sap.com/wiki/x/JQBmBQ

developer help files will also be good to have a look at:

SAP Crystal Reports .NET SDK Developer Guide http://help.sap.com/businessobject/product_guides/sapCRVS2010/en/crnet_dg_2010_en.zip

SAP Crystal Reports .NET API Guide http://help.sap.com/businessobject/product_guides/sapCRVS2010/en/crnet_api_2010_en.zip

- Ludek