博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

RDLC-数据钻取

Posted on 2011-01-28 11:17  Adam哥  阅读(1724)  评论(1编辑  收藏  举报

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

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

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

然后在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]));
    }

counter