예제 #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            ReportedeClientes rpt = new ReportedeClientes();

            rpt.Site = this.Site;
            return(rpt);
        }
예제 #2
0
        public void CargarDatos(ClientesBL clientesBL)
        {
            var bindingSource = new BindingSource();

            bindingSource.DataSource =
                from c in clientesBL.ListadeClientes
                select new
            {
                Id       = c.Id,
                Nombre   = c.Nombre,
                CiudadId = c.CiudadId,
                Telefono = c.Telefono,
                Ciudad   = c.Ciudad.Descripcion,
            };
            var reporte = new ReportedeClientes();

            reporte.SetDataSource(bindingSource);

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