0
我想使用存儲過程動態生成水晶報表。我使用RAS進程內sdk。我已經創建了數據集報告。 我使用的代碼如下:基於存儲過程創建水晶報表
ISCRProcedure proc1 = new Procedure();
CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo newConnectionInfo = new CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo();
ISCRPropertyBag logonAttributes = new PropertyBag();
PropertyBag connectionAttributes = new PropertyBag();
logonAttributes.Add("Data Source", datasource);
logonAttributes.Add("Initial Catalog", "Northwind");
logonAttributes.Add("Provider", "SQLOLEDB");
connectionAttributes.Add("Database DLL", "crdb_ado.dll");
connectionAttributes.Add("QE_DatabaseType", "OLE DB (ADO)");
connectionAttributes.Add("QE_LogonProperties", logonAttributes);
connectionAttributes.Add("QE_SQLDB", true);
connectionAttributes.Add("Server Name", servername);
connectionAttributes.Add("SSO Enabled", false);
newConnectionInfo.Attributes = connectionAttributes;
newConnectionInfo.UserName = username;
newConnectionInfo.Password = password;
newConnectionInfo.Kind = CrConnectionInfoKindEnum.crConnectionInfoKindCRQE;
proc1.ConnectionInfo = newConnectionInfo;
proc1.Name = "sp_SelectAllOrders";
oReportClientDocument.DatabaseController.AddTable(proc1);
我不知道如何訪問該存儲過程的輸出,以將其作爲數據源的報表字段後。任何想法?
是否沒有RAS sdk的示例?我想避免使用存儲過程填充數據集。 – Rahma