Link to home
Start Free TrialLog in
Avatar of phil301
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 jbarber2005
jbarber2005

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.
Avatar of phil301

ASKER

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?
Avatar of phil301

ASKER

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

Report-ISDATA-Properties-Table1-Table2-Table3

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.
Avatar of phil301

ASKER

How do I check to see if the datasource is pointed to local?
you would check underneath the properties node.  It would specifically say "local"
Avatar of phil301

ASKER

Doesnt appear to be set to local.
Underneath the properties node, what is the connection type?  ODBC or OLEDB?
ASKER CERTIFIED SOLUTION
Avatar of phil301
phil301

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial