示例#1
0
        private void hienBaoCao(DataTable dt)
        {
            BenhNhan      rpt        = new BenhNhan();
            ReportObjects rptObjects = rpt.ReportDefinition.ReportObjects;
            TextObject    txtcot     = (TextObject)rptObjects["txtCot"];

            txtcot.Text = cot;
            TextObject txtgiatri = (TextObject)rptObjects["txtGiatri"];

            txtgiatri.Text = giatri;
            rpt.SetDataSource(dt);
            BenhNhan_RPT bc = new BenhNhan_RPT(rpt);

            bc.Show();
        }
        private void hienBaoCao(DataTable dt)
        {
            BenhNhan      rpt        = new BenhNhan();
            ReportObjects rptObjects = rpt.ReportDefinition.ReportObjects;

            if (tatca == true)
            {
                TextObject txtcot = (TextObject)rptObjects["txtCot"];
                txtcot.Text = "Bệnh nhân";
                TextObject txtgiatri = (TextObject)rptObjects["txtGiatri"];
                txtgiatri.Text = "Tất cả";
            }
            else
            {
                TextObject txtcot = (TextObject)rptObjects["txtCot"];
                txtcot.Text = cboCot.Text;
                TextObject txtgiatri = (TextObject)rptObjects["txtGiatri"];
                txtgiatri.Text = cboGiatri.Text;
            }
            rpt.SetDataSource(dt);
            BenhNhan_RPT bc = new BenhNhan_RPT(rpt);

            bc.Show();
        }