views:

145

answers:

0

I'm using CR Server 2008 V1, and I have reports which are bound to MS SQL Stored Procedures. In some cases I don't want to execute SP and I want to bind report to DataSet instead. I tried this:

ConnectionInfo ci = rcd.DatabaseController.GetConnectionInfos(null)[0].Clone(true);
ci.Attributes.Add("Database DLL", "crdb_adoplus.dll");
ci.Attributes.Add("QE_DatabaseName", "");
ci.Attributes.Add("QE_DatabaseType", "ADO.NET (XML)");
ci.Attributes.Add("QE_LogonProperties", "");
ci.Attributes.Add("QE_ServerDescription", "NewDataSet");
ci.Attributes.Add("QE_SQLDB", "0");
ci.Attributes.Add("SSO Enabled", "0");

Table newReportTable = new TableClass();
newReportTable.Name = myDataSet.Tables[0].TableName;
newReportTable.ConnectionInfo = ci;
newReportTable.QualifiedName = myDataSet.Tables[0].TableName;
rcd.DatabaseController.SetTableLocation(reportTable, newReportTable);/* here I recieve "Catastrophic Failure" exception */
CrystalDecisions.ReportAppServer.DataSetConversion.DataSetConverter.SetDataSource(rcd, myDataSet);

Any ideas?