public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            ReportedeViajes rpt = new ReportedeViajes();

            rpt.Site = this.Site;
            return(rpt);
        }
Exemple #2
0
        public void CargarDatos(ViajesBL viajesBL)
        {
            var bindingSource = new BindingSource();

            bindingSource.DataSource =
                from p in viajesBL.ListadeViajes
                select new
            {
                Foto    = p.Foto,
                Id      = p.Id,
                Fecha   = p.Fecha,
                Origen  = p.Origen,
                Destino = p.Destino,
                Precio  = p.Precio
            };

            var reporteViajes = new ReportedeViajes();

            reporteViajes.SetDataSource(bindingSource);

            crystalReportViewer1.ReportSource = reporteViajes;
            crystalReportViewer1.RefreshReport();
        }