Avatar of phil301
 asked on

Crystal Reports Web Viewer, Object not set to an instance of an object

I am attempting to develop my first web page using the crystal reports web viewer. I get the following error when attempting to render the page.

Failed to open the connection. Details: [Database Vendor Code: 4060 ] Database Connector Error: ' [Database Vendor Code: 4060 ]' Failed to open the connection. Failed to open the connection. C:\WINDOWS\TEMP\CrystalReport {6DDF6DCD-EDF4-450E-9904-68996C044EC4}.rpt Details: [Database Vendor Code: 4060 ] CrystalReportViewer - CrystalReportViewer1
Error: Object reference not set to an instance of an object.

If I change the report to a very simple report, the report is displayed correctly. Anyone got any ideas on what I need to look for here?


Avatar of undefined
Last Comment

8/22/2022 - Mon

How is your connection setup?  Is it a SQL Database?  Is it using trusted authentication, or non-trusted (ie Sql authentication or Windows).  Trusted connections do not require the user entering credentials, as non-trusted would require credentials being passed.  It could be your simple report has no connection, or something that is not causing your error.  Please give some more detail, if possible.

SQL Server 2005, I am using a user name and password that is set up the same way as the simple report I created. Also, the report works fine when I run it inside of visual studio, on the local machine (server).

In your report do you have the DataSource set to (local) or to the dataserver name?
Your help has saved me hundreds of hours of internet surfing.

I am not that familiar with Crystal Reports, so bare with me.

If I go into my Database, Set Datasource Location, it looks as follows


Where ISDATA is the database

Not sure if that answered your question or not, let me know.


it answers it somewhat.  What type of connection are you using?  ODBC or OLEDB?  You can find out what database, and type of connection by going to (in VS 2003)

1) right click Database Fields in the Field Explorer, and choose "Set Datasource Location", it looks like you know how to get here
2) Expand the properties node
    --this will tell you if it is ODBC, OLEDB, and what Data Source is pointed to
if you have your report set to ODBC and you are moving it from your development box to a live (or test) server, then you need to make sure that ODBC connection has been created.  You also want to make sure the datasource is not pointed (local) because the live (or test) server most likely does not have a local instance of SQL.

How do I check to see if the datasource is pointed to local?
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.

you would check underneath the properties node.  It would specifically say "local"

Doesnt appear to be set to local.

Underneath the properties node, what is the connection type?  ODBC or OLEDB?
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question