コード例 #1
0
        private void btnShowReport_Click(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            this.reportViewer1.Visible = true;

            ZhiliangRiReportRepository rp = new ZhiliangRiReportRepository();
            质量日报内容 n = rp.GetRiReport(riqiControl.Value.Date);
            机烧粒度内容 m = rp.GetJSReport(riqiControl.Value.Date);
            燃料指标内容 r = rp.GetRLReport(riqiControl.Value.Date);
            套筒窑内容  t = rp.GetTTYReport(riqiControl.Value.Date);

            setDataSource(n, m, r, t);
            this.Cursor = Cursors.Default;
        }
コード例 #2
0
        public void setDataSource(质量日报内容 n, 机烧粒度内容 m, 燃料指标内容 r, 套筒窑内容 t)
        {
            质量日报内容dataSource = n;
            机烧粒度内容dataSource = m;
            燃料指标内容dataSource = r;
            this.dDJSBindingSource.DataSource    = m;
            this.DDYLBindingSource.DataSource    = n;
            this.燃料指标内容项BindingSource.DataSource = r;
            List <ReportParameter> para = new List <ReportParameter>();

            para.Add(new ReportParameter("Riqi", n.riqi.ToString("yyyy年MM月dd日")));
            String leader            = LTZN.Data.SysParameter.GetStrParameter("单位负责人", "郝江敏");
            String dayReportAuthor   = LTZN.Data.SysParameter.GetStrParameter("日报负责人", "刘红芬");
            String monthReportAuthor = LTZN.Data.SysParameter.GetStrParameter("月报负责人", "王文英");


            string yejiao = "单位负责人:“" + leader + "”  制表人:“" + dayReportAuthor + "”  第 + + 页,共一页";

            para.Add(new ReportParameter("yejiao", yejiao));
            para.Add(new ReportParameter("actUser", dayReportAuthor));
            this.reportViewer1.LocalReport.SetParameters(para);
            this.reportViewer1.RefreshReport();
            this.reportViewer1.Refresh();
        }