private void R_Articulos_Load(object sender, EventArgs e) { Microsoft.Reporting.WinForms.ReportParameter Descripcion; if (tagIndicador == 1) { Descripcion = new Microsoft.Reporting.WinForms.ReportParameter("Descripcion", "Stock Bajo"); System.Drawing.Printing.PageSettings page = new System.Drawing.Printing.PageSettings(); page.Margins = new System.Drawing.Printing.Margins(50, 50, 50, 50); reportViewer1.SetPageSettings(page); ArticulosBindingSource.DataSource = Cdatos_reportes.StockBajo(); } else if (tagIndicador == 2) { Descripcion = new Microsoft.Reporting.WinForms.ReportParameter("Descripcion", "Stock medio"); ArticulosBindingSource.DataSource = Cdatos_reportes.StockMedio(); } else if (tagIndicador == 3) { Descripcion = new Microsoft.Reporting.WinForms.ReportParameter("Descripcion", "Stock Alto"); ArticulosBindingSource.DataSource = Cdatos_reportes.StockAlto(); } else { Descripcion = new Microsoft.Reporting.WinForms.ReportParameter("Descripcion", "Stock Todos"); ArticulosBindingSource.DataSource = Cdatos_reportes.StockTodos(); } reportViewer1.LocalReport.SetParameters(Descripcion); this.reportViewer1.RefreshReport(); }
private void R_Usuarios_Load(object sender, EventArgs e) { UsuariosBindingSource.DataSource = Cdatos_reportes.Usuarios(altas); System.Drawing.Printing.PageSettings page = new System.Drawing.Printing.PageSettings(); page.Margins = new System.Drawing.Printing.Margins(50, 50, 50, 50); reportViewer1.SetPageSettings(page); this.reportViewer1.RefreshReport(); }
private void R_Ventas_Load(object sender, EventArgs e) { string dia = Dia.ToShortDateString(); Microsoft.Reporting.WinForms.ReportParameter Descripcion = new Microsoft.Reporting.WinForms.ReportParameter("Fecha", dia); VentasBindingSource.DataSource = Cdatos_reportes.VentasDia(dia); reportViewer1.LocalReport.SetParameters(Descripcion); System.Drawing.Printing.PageSettings page = new System.Drawing.Printing.PageSettings(); page.Margins = new System.Drawing.Printing.Margins(50, 50, 50, 50); reportViewer1.SetPageSettings(page); this.reportViewer1.RefreshReport(); }
private void R_Cuenta_Load(object sender, EventArgs e) { Microsoft.Reporting.WinForms.ReportParameter alta = new Microsoft.Reporting.WinForms.ReportParameter("Altas", "true"); Microsoft.Reporting.WinForms.ReportParameter Nombre = new Microsoft.Reporting.WinForms.ReportParameter("Nombre", oPersona.Nombre); Microsoft.Reporting.WinForms.ReportParameter Saldo = new Microsoft.Reporting.WinForms.ReportParameter("Saldo", oPersona.DevolverCuentaCorriente().Saldo.ToString()); Microsoft.Reporting.WinForms.ReportParameter Direccion = new Microsoft.Reporting.WinForms.ReportParameter("Direccion", oPersona.Domicilio); Microsoft.Reporting.WinForms.ReportParameter Particular = new Microsoft.Reporting.WinForms.ReportParameter("Particular", oPersona.Tel); Microsoft.Reporting.WinForms.ReportParameter Celular = new Microsoft.Reporting.WinForms.ReportParameter("Celular", oPersona.Cel); reportViewer1.LocalReport.SetParameters(alta); reportViewer1.LocalReport.SetParameters(Nombre); reportViewer1.LocalReport.SetParameters(Direccion); reportViewer1.LocalReport.SetParameters(Saldo); reportViewer1.LocalReport.SetParameters(Particular); reportViewer1.LocalReport.SetParameters(Celular); CreditosBindingSource.DataSource = Cdatos_reportes.DevolverCreditos(oPersona.DevolverCuentaCorriente()); DebitosBindingSource.DataSource = Cdatos_reportes.DevolverDebitos(oPersona.DevolverCuentaCorriente()); System.Drawing.Printing.PageSettings page = new System.Drawing.Printing.PageSettings(); page.Margins = new System.Drawing.Printing.Margins(50, 50, 50, 50); reportViewer1.SetPageSettings(page); this.reportViewer1.RefreshReport(); }
private void R_CuentasProveedores_Load(object sender, EventArgs e) { Microsoft.Reporting.WinForms.ReportParameter Personas; if (tagIndicador == 1) { Personas = new Microsoft.Reporting.WinForms.ReportParameter("Personas", "clientes"); CuentasCorrientesBindingSource.DataSource = Cdatos_reportes.CuentasClientes(Alta); } else if (tagIndicador == 2) { Personas = new Microsoft.Reporting.WinForms.ReportParameter("Personas", "proveedores"); CuentasCorrientesBindingSource.DataSource = Cdatos_reportes.CuentasProveedores(Alta); } else { Personas = new Microsoft.Reporting.WinForms.ReportParameter("Personas", "Usuarios"); CuentasCorrientesBindingSource.DataSource = Cdatos_reportes.CuentasUsuarios(Alta); } reportViewer1.LocalReport.SetParameters(Personas); System.Drawing.Printing.PageSettings page = new System.Drawing.Printing.PageSettings(); page.Margins = new System.Drawing.Printing.Margins(50, 50, 50, 50); reportViewer1.SetPageSettings(page); this.reportViewer1.RefreshReport(); }