private void btnBuscar_Click(object sender, EventArgs e) { _ClientesBL = new ClientesBL(); var textoABuscar = txtBuscarCliente.Text; bindingsource.DataSource = _ClientesBL.ObtenerClientes(textoABuscar); reporte.SetDataSource(bindingsource); crystalReportViewer1.ReportSource = reporte; crystalReportViewer1.RefreshReport(); }
public FormReporteClientes() { InitializeComponent(); List <TextBox> BuscarTlist = new List <TextBox>(); List <string> BuscarSlist = new List <String>(); BuscarTlist.Add(txtBuscarCliente); BuscarSlist.Add("Filtrar cliente por nombre"); SetCueBanner(ref BuscarTlist, BuscarSlist); _ClientesBL = new ClientesBL(); bindingsource = new BindingSource(); bindingsource.DataSource = _ClientesBL.ObtenerClientes(); reporte = new ReporteClientes(); reporte.SetDataSource(bindingsource); crystalReportViewer1.ReportSource = reporte; crystalReportViewer1.RefreshReport(); }