private void active_contrato() { try { var path = string.Empty; var directorios = Application.StartupPath.Split('\\'); if (directorios.Length > 0) { path = directorios[0] + "\\" + directorios[1]; } var reporteContrato = new Crpt_Contratos(); reporteContrato.SetDataSource(Reporte_Contratos()); crystalReportViewer1.ReportSource = reporteContrato; crystalReportViewer1.Show(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { var rpt = new Crpt_Contratos(); rpt.Site = Site; return rpt; }