Exemple #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            rptInBaiThi rpt = new rptInBaiThi();

            rpt.Site = this.Site;
            return(rpt);
        }
Exemple #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            Layngaythi();
            Baocao.rptInBaiThi obj  = new Baocao.rptInBaiThi();
            string             lenh = "EXEC SP_INBAITHI '" + txtMasv.Text + "','" + cbxMamh.Text + "','" + cbxLanthi.Text + "'";

            try
            {
                DataTable tb = Program.ExecSqlDataTable(lenh);
                obj.SetDataSource(tb);
                obj.SetParameterValue("LOP", cbxMalop.Text);
                obj.SetParameterValue("HOTEN", Program.mHoten);
                obj.SetParameterValue("MONTHI", cbxMamh.Text);
                obj.SetParameterValue("LANTHI", cbxLanthi.Text);
                obj.SetParameterValue("NGAYTHI", Program.Ngaythi);
                crystalReportViewer1.ReportSource = obj;
            }
            catch (Exception ex)
            {
                MessageBox.Show("Lỗi! " + ex.Message);
                return;
            }
        }