Error setting ReportDocument.SetDataSource with Dataset
I'm using Visual Basic 2015 (Visual Studio 2015 Professional) and SAP Crystal Report for Visual Studio SP16.
To send dynamically data from ADODB.Recordset to Report I'm setting ReportDocument.SetDataSource property with a Dataset, the same of the Report DataSource (generated with Dataset.WriteXML):
This solution work correctly in VS2008.
The cryRpt.SetDataSource setting generate the following Error: Unable to load the database information
Attached Report DataSource Image and XML Dataset.
Thanks for help.
Don Williams replied
It's C# but this works for me:
System.Data.DataSet ds = new System.Data.DataSet();
// as long as the field names match exactly Cr has no problems setting report to a DS.
// either one of these work, if only 1 table in report next line will work also.
catch (Exception ex)
MessageBox.Show("ERROR: Schema Mismatch. Error reported by CR: " + ex.Message);
As long as the table name is the same it should not have a problem.
If you have multiple tables then it could be a problem, you would need to set the AliasName also.
Also used the Logon Method and that too works....
I would check your report for errors, bad formula that could be using a field that no longer exists is a known problem.