private void jButton24ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton24ActionPerformed
        Relatorios.this.dispose();
        if (jDateInicialRA1.getDate() != null && jDateFinalRA1.getDate() != null) {
            try {
                Connection con = new Conexao().getConnection();
                HashMap parametros = new HashMap();
                String formatador = new SimpleDateFormat("dd/MM/yyyy").format(jDateInicialRA1.getDate());
                String formatadorF = new SimpleDateFormat("dd/MM/yyyy").format(jDateFinalRA1.getDate());
                parametros.put("VALOR", formatador);
                parametros.put("VALOR_FINAL", formatadorF);


                JasperPrint jp = JasperFillManager.fillReport("./relatorios/PagamentosPendentesInativoIFX.jasper", parametros, con);
                if (jRBSalvar.isSelected()) {
                    JasperExportManager.exportReportToPdfFile(jp, "C:/Contas a receber Contratos - DATA INÍCIO - FIM - Seeds.pdf");
                }
                JasperViewer jrv = new JasperViewer(jp, false);
                jrv.setVisible(true);
                con.close();
            } catch (Exception e) {
                e.printStackTrace();
            }
            try {
                Connection con = new Conexao().getConnection();
                HashMap parametros = new HashMap();
                String formatador = new SimpleDateFormat("dd/MM/yyyy").format(jDateInicialRA1.getDate());
                String formatadorF = new SimpleDateFormat("dd/MM/yyyy").format(jDateFinalRA1.getDate());
                parametros.put("VALOR", formatador);
                parametros.put("VALOR_FINAL", formatadorF);


                JasperPrint jp = JasperFillManager.fillReport("./relatorios/PagamentosPendentesInativoIF1X.jasper", parametros, con);
                if (jRBSalvar.isSelected()) {
                    JasperExportManager.exportReportToPdfFile(jp, "C:/Contas a receber Contratos Pendentes - DATA INÍCIO - FIM - Seeds.pdf");
                }
                JasperViewer jrv = new JasperViewer(jp, false);
                jrv.setVisible(true);
                con.close();
            } catch (Exception e) {
                e.printStackTrace();
            }

        } else {
            try {

                ContasRDAO dao = new ContasRDAO();


                selection = JOptionPane.showConfirmDialog(this,
                        "Deseja carregar todos dados?\n"
                        + "Consta na base de dados: \n" + dao.gerarCodigoContaR() + ""
                        + " registros.",
                        "", JOptionPane.OK_CANCEL_OPTION,
                        JOptionPane.WARNING_MESSAGE);

                dao.desconectar();
            } catch (Exception ex) {
                Logger.getLogger(Relatorios.class.getName()).log(Level.SEVERE, null, ex);
            }
            if (selection == JOptionPane.OK_OPTION) {
                try {
                    Connection con = new Conexao().getConnection();
                    HashMap parametros = new HashMap();


                    JasperPrint jp = JasperFillManager.fillReport("./relatorios/PagamentosPendentesInativo2X.jasper", parametros, con);
                    if (jRBSalvar.isSelected()) {
                        JasperExportManager.exportReportToPdfFile(jp, "C:/Contas a receber Contratos - data início - fim - Seeds.pdf");
                    }
                    JasperViewer jrv = new JasperViewer(jp, false);
                    jrv.setVisible(true);
                    con.close();
                } catch (Exception e) {
                    e.printStackTrace();
                }
                try {
                    Connection con = new Conexao().getConnection();
                    HashMap parametros = new HashMap();


                    JasperPrint jp = JasperFillManager.fillReport("./relatorios/PagamentosPendentesInativo21X.jasper", parametros, con);
                    if (jRBSalvar.isSelected()) {
                        JasperExportManager.exportReportToPdfFile(jp, "C:/Contas a receber Contratos Pendentes - data início - fim - Seeds.pdf");
                    }
                    JasperViewer jrv = new JasperViewer(jp, false);
                    jrv.setVisible(true);
                    con.close();
                } catch (Exception e) {
                    e.printStackTrace();
                }
            } else {
                new Relatorios(null, rootPaneCheckingEnabled).setVisible(true);
            }

        }
    }