public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { BaoCaoTheoMon rpt = new BaoCaoTheoMon(); rpt.Site = this.Site; return(rpt); }
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) ;*/ }
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { BaoCaoTheoMon rpt = new BaoCaoTheoMon(); rpt.Site = this.Site; return rpt; }
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) ;*/ }