public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { CRUtilidad3 rpt = new CRUtilidad3(); rpt.Site = this.Site; return(rpt); }
private void btnReporte_Click(object sender, EventArgs e) { try { CRUtilidad3 rpt = new CRUtilidad3(); frmRptVentxVendedor frm = new frmRptVentxVendedor(); //rpt.SetDataSource(ds.Reporte(frmLogin.iCodSucursal, dtpFecha1.Value, dtpFecha2.Value, Convert.ToInt32(cmbFormaPago.SelectedValue),Convert.ToInt32(cmbVendedor.SelectedValue), Convert.ToInt32(cmbZona.SelectedValue)).Tables[0]); DataTable dt = ds.Utilidad3(dtpFecha1.Value, dtpFecha2.Value, frmLogin.iCodAlmacen).Tables[0]; if (dt.Rows.Count > 0) { rpt.SetDataSource(dt); frm.crvRptVentxVendedor.ReportSource = rpt; frm.Show(); } } catch (Exception a) { MessageBox.Show(a.Message); } }