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

            rpt.Site = this.Site;
            return(rpt);
        }
Example #2
0
        private void btnBaoCao_Click(object sender, System.EventArgs e)
        {
            QUANLYHOCSINHCAP3.KNCSDL.DataProvider _provider = new QUANLYHOCSINHCAP3.KNCSDL.DataProvider();

            if (nflag == 1)
            {
                BANGDIEM.RptBangDiemHS rpt = new QUANLYHOCSINHCAP3.BANGDIEM.RptBangDiemHS();
                rpt.SetDatabaseLogon(username, password);
                rpt.SetParameterValue("pMaHS", txtMaHS.Text);
                crystalReportViewer1.ReportSource = rpt;
            }
            if (nflag == 0)
            {
                BANGDIEM.RptDSHS rpt = new QUANLYHOCSINHCAP3.BANGDIEM.RptDSHS();
                rpt.SetDatabaseLogon(username, password);
                rpt.SetParameterValue("pLop", (string)cboLop.SelectedValue);
                rpt.SetParameterValue("pMamon", (string)cboMon.SelectedValue);
                crystalReportViewer1.ReportSource = rpt;
            }
            if (nflag == 2)
            {
                string         MaHK = (string)cboHocky.SelectedValue;
                RptBaocaoHocki rpt  = new RptBaocaoHocki();
                rpt.SetDatabaseLogon(username, password);
                rpt.SetParameterValue("pMaHK", MaHK);
                crystalReportViewer1.ReportSource = rpt;
            }
            if (nflag == 4)
            {
                BaoCaoTheoMon rpt = new BaoCaoTheoMon();
                rpt.SetDatabaseLogon(username, password);
                rpt.SetParameterValue("pMaHK", (string)cboHocky.SelectedValue);
                rpt.SetParameterValue("pMaMon", (string)cboMon.SelectedValue);
                crystalReportViewer1.ReportSource = rpt;
            }
            //CACH EXPORT VO WORD

            /*SaveFileDialog dlg = new SaveFileDialog ();
             * if (dlg.ShowDialog()==DialogResult.OK)
             *      rpt.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.WordForWindows,dlg.FileName) ;*/
        }
Example #3
0
		private void btnBaoCao_Click(object sender, System.EventArgs e)
		{
			QUANLYHOCSINHCAP3.KNCSDL.DataProvider _provider=new QUANLYHOCSINHCAP3.KNCSDL.DataProvider();
			
			if (nflag==1)
			{
				BANGDIEM.RptBangDiemHS  rpt=new QUANLYHOCSINHCAP3.BANGDIEM.RptBangDiemHS ();
				rpt.SetDatabaseLogon(username , password);
				rpt.SetParameterValue("pMaHS",txtMaHS.Text);
				crystalReportViewer1.ReportSource = rpt;
			}
			if (nflag==0)
			{
				BANGDIEM.RptDSHS rpt=new QUANLYHOCSINHCAP3.BANGDIEM.RptDSHS();
				rpt.SetDatabaseLogon(username , password);
				rpt.SetParameterValue("pLop",(string)cboLop.SelectedValue);
				rpt.SetParameterValue("pMamon",(string)cboMon.SelectedValue);
				crystalReportViewer1.ReportSource = rpt;
			}
			if (nflag==2)
			{
				string MaHK=(string)cboHocky.SelectedValue;
				RptBaocaoHocki  rpt=new RptBaocaoHocki ();
				rpt.SetDatabaseLogon(username , password);
				rpt.SetParameterValue("pMaHK",MaHK);
				crystalReportViewer1.ReportSource = rpt;
			}
			if (nflag==4)
			{
				BaoCaoTheoMon  rpt=new BaoCaoTheoMon();
				rpt.SetDatabaseLogon(username , password);
				rpt.SetParameterValue("pMaHK",(string)cboHocky.SelectedValue);
				rpt.SetParameterValue("pMaMon",(string)cboMon.SelectedValue);
				crystalReportViewer1.ReportSource = rpt;
				
			}
			//CACH EXPORT VO WORD
			/*SaveFileDialog dlg = new SaveFileDialog ();
			if (dlg.ShowDialog()==DialogResult.OK)
				rpt.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.WordForWindows,dlg.FileName) ;*/	
		}
Example #4
0
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
     RptBaocaoHocki rpt = new RptBaocaoHocki();
     rpt.Site = this.Site;
     return rpt;
 }