private void Frmimpnotaventa_Load(object sender, EventArgs e) { try { VentasReducida1.SetParameterValue("@idventa", codventa); if ("directo" == NegocioConfigEmpresa.confsistema("modoimpventa").ToString()) { VentasReducida1.PrintOptions.PrinterName = NegocioConfigEmpresa.impticket != "" ? NegocioConfigEmpresa.impticket : UtilityFrm.GetImpresoraDefecto(); VentasReducida1.PrintToPrinter(1, false, 0, 0); this.Close(); } else if (NegocioConfigEmpresa.confsistema("modoimpventa") == "vista") { crystalReportViewer1.ReportSource = VentasReducida1; } } catch (Exception ex) { UtilityFrm.mensajeError(ex.Message); } }