report.rdlc自定义数据源连接

string str_sql = "select customer_no,baby_name,baby_birthday,baby_sex,dad_name,dad_tel,mum_name,mum_tel from t_customer where customer_no='"+MyModule .customerno +"'";
            DataSet DataSet1 = cls.Getds(str_sql, "customer");
            string str_sql2 = "select t_order.remark,t_order.order_no,t_order.booking_date,t_order.ms,t_package.package_name,t_order.booking_price,t_order.pre_camera_date,t_order.clother_num,t_order.pic_num from t_order inner join t_package on t_order.package_no=t_package.package_no where order_no='"+MyModule .orderno +"'";
            DataSet DataSet2 = cls.Getds(str_sql2, "order");
            string str_sql3 = "select t_product.product_name,t_orderitem.product_num,t_orderitem.pages,t_orderitem.photo_num from t_orderitem inner join t_product on t_orderitem.product_no=t_product.product_no where order_no='"+MyModule .orderno +"' ";
            DataSet DataSet3 = cls.Getds(str_sql3, "orderitem");
            string str_sql4 = "select store_name,store_tel,store_address from t_store where store_no='" + MyModule.Store_No + "'";
            DataSet DataSet4 = cls.Getds(str_sql4, "store");
            //ReportDataSource rds = new ReportDataSource();
            //rds.Value = ds.Tables[0];
            //rds.Name = "order";
            //this.reportViewer1.LocalReport.DataSources.Add(rds);
            //reportViewer1.ProcessingMode = ProcessingMode.Local;

 

            ReportDataSource rds = new ReportDataSource("DataSet1", DataSet1.Tables[0]);
            ReportDataSource rds2 = new ReportDataSource("DataSet2", DataSet2.Tables[0]);
            ReportDataSource rds3 = new ReportDataSource("DataSet3", DataSet3.Tables[0]);
            ReportDataSource rds4 = new ReportDataSource("DataSet4", DataSet4.Tables[0]);
            //reportViewer1.LocalReport.DataSources.Clear();
            reportViewer1.LocalReport.DataSources.Add(rds);
            reportViewer1.LocalReport.DataSources.Add(rds2);
            reportViewer1.LocalReport.DataSources.Add(rds3);
            reportViewer1.LocalReport.DataSources.Add(rds4);
            this.reportViewer1.RefreshReport();

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值