Exemplo n.º 1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            rpt_khtc04 rpt = new rpt_khtc04();

            rpt.Site = this.Site;
            return(rpt);
        }
Exemplo n.º 2
0
        private void btnOk_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                ServerInfor srv = new ServerInfor();
                cls.ClsConnect();
                int      thamso = 2;
                string[] bien   = new string[thamso];
                object[] giatri = new object[thamso];
                bien[0] = "@Ngay";
                if (dtpNgay.SelectedDate != null)
                {
                    giatri[0] = dtpNgay.SelectedDate.Value.ToString("yyyy-MM-dd");
                }
                bien[1]   = "@MaPos";
                giatri[1] = str.Left(cboPos.SelectedValue.ToString().Trim(), 6);
                dt        = cls.LoadDataProcPara("usp_khtc04", bien, giatri, thamso);

                if (dt.Rows.Count > 0)
                {
                    rpt_khtc04 rpt = new rpt_khtc04();
                    RPUtility.ShowRp(rpt, dt, this, srv.DbSourceSerVer(), srv.DbNameSerVer(), srv.DbUserSerVer(), srv.DbPassSerVer());
                }
                else
                {
                    MessageBox.Show("Chưa có số liệu", "Thông báo");
                }
                cls.DongKetNoi();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Lổi " + ex.Message, "Mess");
            }
        }