【发布时间】:2010-03-02 04:57:03
【问题描述】:
我已经完成了一个 asp.net 应用程序来生成特定数据的报告。最初,我创建了本地报告 (.rdlc) 来生成报告。我为每个 rdlc 创建了单独的 .xsd 并设计了报告。我以编程方式构建数据集并将其绑定到 rdlc。我使用以下代码将数据源绑定到报告 -
rptMyReport.LocalReport.ReportPath = Server.MapPath(srdlcName);
rptMyReport.LocalReport.DataSources.Add(rds);
现在我已经将this msdn article 之后的所有 rdlc 转换为 rdl,并且我已将报告发布到报告服务器。
rptMyReport.ServerReport.ReportServerUrl = new System.Uri("http://ReportServer/ReportServer");
rptMyReport.ServerReport.ReportPath = "/ReportFolder/ReportName";
现在如何以编程方式将数据源设置为报告?
【问题讨论】:
标签: c# asp.net sql-server reporting-services