zoukankan      html  css  js  c++  java
  • winform 子报表数据源赋值

    this.reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("DataSet2", ds_com.Tables[0]));
    this.reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("DataSet1", dtDisHearder));


    this.reportViewer1.LocalReport.SubreportProcessing += (s1, e1) => {
                            e1.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("DataSet2", ds_com.Tables[0]));
                        };


    ReportParameter rp = new ReportParameter("logUser", DB.loginUserName);
    this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { rp });

     //FDA值                    

    rp = new ReportParameter("fdaValue", _fdaValue.ToString());                    

    this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { rp });                    

    //非FDA值

    rp = new ReportParameter("nFdaValue", _nFdaValue.ToString());                    

    this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { rp });

    rp = new ReportParameter("add_signor", strSignor);
    this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { rp });
    rp = new ReportParameter("addr_footer", strFooter);
    this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { rp });
    rp = new ReportParameter("addr_remark", strRemark);
    this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { rp });                          
    rp = new ReportParameter("totalValue", _totalPrice.ToString());
    this.reportViewer1.LocalReport.SetParameters(new ReportParameter[] { rp });
    this.reportViewer1.RefreshReport();     

  • 相关阅读:
    TP生成二维码插件
    day23 常用模块(中)
    day22 作业
    day22 常用模块(上)
    day21 模块与包+软件开发目录规范
    day20 作业
    day20 函数收尾+面向过程+模块
    day19 作业
    day19 生成器+函数递归
    day18 作业
  • 原文地址:https://www.cnblogs.com/szlixin/p/5065675.html
Copyright © 2011-2022 走看看