您当前的位置: 首页 > 

暂无认证

  • 0浏览

    0关注

    101061博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

[RDLC]数据绑定

发布时间:2010-04-23 13:06:00 ,浏览量:0

至于如何建立RDLC的过程 详情:http://www.cnblogs.com/wjhx/archive/2007/06/12/379604.htm

http://www.cnblogs.com/wjhx/archive/2006/04/21/381644.html

后台:

DataSet thisDataSet = new DataSet();
        this.ReportViewer1.LocalReport.ReportEmbeddedResource = "..//Reports//SendGoods.rdlc";

        SqlParameter[] parms = new SqlParameter[2];
        parms[0] = new SqlParameter("@StartDate", SqlDbType.NVarChar, 8);
        parms[1] = new SqlParameter("@EndDate", SqlDbType.NVarChar, 8);

        parms[0].Value = d1;
        parms[1].Value =d2;
        DABaseAccess db = new DABaseAccess("ZM");
        thisDataSet = db.RunprocToDataSet("UP_SendGoods", parms);

        ReportDataSource datasource = new ReportDataSource("myds", thisDataSet.Tables[0]);
        ReportViewer1.LocalReport.DataSources.Clear();
        ReportViewer1.LocalReport.DataSources.Add(datasource);
        if (thisDataSet.Tables[0].Rows.Count == 0)
        {
            JScript.Alert("Sorry, no products under this category!", this.Page);
        }
        ReportViewer1.LocalReport.Refresh();l

关注
打赏
1655516835
查看更多评论
立即登录/注册

微信扫码登录

0.2241s