private void mostrarReporte() { if (tabla_detalle_venta.RowCount != 0) { Reportes.Interfaz.visor_reportes frm = new Reportes.Interfaz.visor_reportes(); frm.Encabezado = "Reporte de ventas de medicina"; Reportes.Diseño.reporte_ventas_medicina repo_farmacia = new Reportes.Diseño.reporte_ventas_medicina(); if (!sesion.Caja_activa || chkPeriodo.Checked) { repo_farmacia.SetDataSource(conexiones_BD.farmacias.todos_datos_productos_id_periodo(fechaInicial.Value.ToString("yyyy-MM-dd"), fechaFinal.Value.ToString("yyyy-MM-dd"))); repo_farmacia.SetParameterValue("encabezado", "REPORTE VENTA DE MEDICINA"); repo_farmacia.SetParameterValue("fecha", "De: " + fechaInicial.Value.ToString("dd-MM-yyyy") + " A " + fechaFinal.Value.ToString("dd-MM-yyyy")); frm.reporte.ReportSource = repo_farmacia; } else { repo_farmacia.SetDataSource(conexiones_BD.farmacias.todos_datos_productos_id(sesion.Idcaja)); repo_farmacia.SetParameterValue("encabezado", "REPORTE VENTA DE MEDICINA"); repo_farmacia.SetParameterValue("fecha", "Caja número: " + sesion.Idcaja); frm.reporte.ReportSource = repo_farmacia; } frm.ShowDialog(); } }
private void mostrarReporte(string mensaje, string encabezado_reporte) { Reportes.Interfaz.visor_reportes frm = new Reportes.Interfaz.visor_reportes(); frm.Encabezado = mensaje; Reportes.Diseño.reporteCortes repocaja = new Reportes.Diseño.reporteCortes(); repocaja.SetDataSource(datos); repocaja.SetParameterValue("encabezado", encabezado_reporte); repocaja.SetParameterValue("fecha", DateTime.Now.ToString()); repocaja.SetParameterValue("idcaja", "Numero de ID de la caja: " + this.idcaja); repocaja.SetParameterValue("total", total); repocaja.SetParameterValue("efect_ini", efectivoI); frm.reporte.ReportSource = repocaja; frm.ShowDialog(); }
private void btnReporte_Click(object sender, EventArgs e) { int id = (int)tabla_Clientes.CurrentRow.Cells[2].Value; Reportes.Interfaz.visor_reportes frm = new Reportes.Interfaz.visor_reportes(); frm.Encabezado = "Reporte de cliente"; Reportes.Diseño.reporte_comprasXcliente repo = new Reportes.Diseño.reporte_comprasXcliente(); repo.SetDataSource(conexiones_BD.clases.clientes.detalleventasXclientes(id, fi, ff)); repo.SetParameterValue("nombre_cliente", txtNombre.Text); repo.SetParameterValue("fecha_inicial", fi); repo.SetParameterValue("fecha_final", ff); repo.SetParameterValue("direccion", txtDireccion.Text); repo.SetParameterValue("monto_total", lblTotal.Text); frm.reporte.ReportSource = repo; frm.ShowDialog(); }