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

            rpt.Site = this.Site;
            return(rpt);
        }
        public void CargarDatos(ProveedoresBL proveedoresBL)
        {
            // var bindingSoure = new BindingSource();
            // bindingSoure.DataSource = proveedoresBL.ListadeProveedores;


            var bindingSource = new BindingSource();

            bindingSource.DataSource =
                from x in proveedoresBL.ListadeProveedores
                select new
            {
                Foto     = x.Foto,
                Id       = x.Id,
                Nombre   = x.Nombre,
                Telefono = x.Telefono,
            };

            var reporte = new ReportedeProveedores();

            reporte.SetDataSource(bindingSource);

            crystalReportViewer1.ReportSource = reporte;
            crystalReportViewer1.RefreshReport();
        }
Beispiel #3
0
        public void cargarDatos(ProveedoresBL proveedoresBL)
        {
            var bindingSource = new BindingSource();

            bindingSource.DataSource =
                from pr in proveedoresBL.ListadeProveedores

                select new
            {
                Id       = pr.Id,
                Nombre   = pr.Nombre,
                Telefono = pr.Telefono,
            };

            var reporte = new ReportedeProveedores();

            reporte.SetDataSource(bindingSource);

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