现在的位置: 首页 > 综合 > 正文

RDLC-数据钻取

2013年04月26日 ⁄ 综合 ⁄ 共 486字 ⁄ 字号 评论关闭

数据钻取这名字有意思,其实就有点像超链接一样。

要实现数据钻取的话与上一篇中添加子报表多一点点内容。

在你需要进行钻取的字段中设置跳转属性如下图:

然后在aspx的reportviewer控件中加入跳转事件:

  protected void ReportViewer1_Drillthrough(object sender, DrillthroughEventArgs e)
    {
        LocalReport localReport = (LocalReport)e.Report;
        localReport.DataSources.Add(new ReportDataSource("ReportDataSet_Client", ds.Tables[0]));
        localReport.DataSources.Add(new ReportDataSource("ReportDataSet_Product", ds.Tables[1]));
        localReport.DataSources.Add(new ReportDataSource("ReportDataSet_OrderView", ds.Tables[2]));
    }

抱歉!评论已关闭.