on 06-30-2011 3:21 PM
Hello,
I receive an "data source object is not valid" error when I want to print one CR document after setting an ADODB.Recordset on SetDataSource method of my report.
On my developer station, this operation works without problem but on client station, I get this error.
The redistributable package for client is installed on client side (CRRuntime_32bit_13_0_1.msi).
Can someone help me?
Thank you.
Never seen that error before. Is it an error from CR, or(?). Can you post a screenshot of the error?
Start with comparing dlls; Use [Modules|https://smpdl.sap-ag.de/~sapidp/012002523100006252802008E/modules.zip] compare the dev box logs to the runtime box...
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup
Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello everybody,
After using "Module" and compare differences, I find that ADODB.DLL was missing on Client side.
I do not understand why SQL Statment with ADODB Recordset was running fine on both Client and Developer side and why I get error only when I try to assign my ADODB Recordset to Crystal Report on Client side but now it is working fine.
Thank you very much for your help.
David.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank's for your answers
Dim rsPkLst As ADODB.Recordset = Nothing
Dim report As New crPickingList
...
' Fill ADODB.Recordset with SQL Statment
...
If rsPkLst.RecordCount > 0 Then
report.SetDataSource(rsPkLst) ' Error : The data source object is invalid
EndIf
...
This error appears during "report.SetDataSource(rsPkLst)" instruction.
ADODB drivers are already installed and my ADODB.Recordset is filled with good records.
This project is an updated project from Visual Studio 2003 to Visual studio 2010 and the old version was running fine.
Developer and client station runs under Windows XP SP3.
On developer side I install CRforVS_13_0_1 (BuildVersion=13.0.1.220.Cortez_CR4VS).
On client side I install CRRuntime_32bit_13_0_1.msi.
Both stations use Microsoft .Net Framework 4.
Move to ADO.NET is a solution but, for the moment, I do not have the time to change all applications from my company.
(I get this error from all application updated from VS 2003 to VS 2010 developed since 2005)
David.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've been trying to test this today and have run into a few problems. But in my research I found that you can use an OleDbDataAdapter.Fill() method to convert a RecordSet to a DataSet. It is one line and may help you get around this issue without re-writing ALL your code.
Worth checking out, http://msdn.microsoft.com/en-us/library/aa720078(v=vs.71).aspx
OleDbDataAdapter myDA = new OleDbDataAdapter();
DataSet myDS = New DataSet();
myDA.Fill(myDS, adoRS, "MyTable");
Hi David,
As Ludek and I both said, it works on your Dev PC so It's not your code.
Search for this Kbase: SAP Note [1553469 - How to enable Database logging in Crystal Reports for Visual Studio 2010|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333533353333333433363339%7D.do]
Enable logging on the runtime only PC and see what it's telling you. Do it on the DEV PC also to compare...
Thanks
Don
Maybe it's time to move to ADO.NET DataTable or DataSets?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sounds to me like you don't have the SQL Client installed or the ADODB.Recordset drivers installed.
What version of MS SQL Server are you using and if it's SQL 2008 do you have the Client installed from the SQL CD?
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.