public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { rpt_KTHDT rpt = new rpt_KTHDT(); rpt.Site = this.Site; return(rpt); }
private void BtnIn_OnClick(object sender, RoutedEventArgs e) { cls.ClsConnect(); try { if (Ration1.IsChecked == true) { strsql = "select * from KTHDT where NAM='" + dtpNgay.SelectedDate.Value.ToString("yyyy") + "' and PO_MA='" + s.Left(CboPos.SelectedValue.ToString().Trim(), 6) + "' and MAU='1' and TO_DVUT='" + s.Left(CboDvut.SelectedValue.ToString().Trim(), 2) + "' order by MAXA"; } else { strsql = "select * from KTHDT where PO_MA='" + s.Left(CboPos.SelectedValue.ToString().Trim(), 6) + "' and MAU='2' order by TO_DVUT"; } var dtin = cls.LoadDataText(strsql); rpt_KTHDT rpt = new rpt_KTHDT(); RPUtility.ShowRp(rpt, dtin, this, srv.DbSourceSerVer(), srv.DbNameSerVer(), srv.DbUserSerVer(), srv.DbPassSerVer()); } catch (Exception ex) { MessageBox.Show("Tiếp tục" + ex.Message, "Mess"); } cls.DongKetNoi(); }