Ireport x Parâmetros

Gente, boa noite!

Alguém pode me informar como eu faço uma consulta no ireport usando 2 parametros?

Exemplo: Do meu aplicativo enviarei os parâmetros Municipio e Rota, para que por meio destes dois parâmetros o ireport me forneça os endereços extraídos do banco usando estes dois parâmetros!

Já fiz com um, mas com dois não…

Grato!

com um parâmetro:

[code]public void gerarRelatorioParametroMunicipio(String municipio, String caminhoJasper,  String nomeRelatorio) throws JRException, SQLException, ClassNotFoundException {
    
   
    JasperPrint rel = null;

    try {
      

         HashMap<String, String> parametroMap = new HashMap<String, String>();
         //o nome do parametro e o valor são passados ao HashMap
         parametroMap.put("ParametroMunicipio", municipio);

         String arquivoJasper =  caminhoJasper;

        rel = JasperFillManager.fillReport(arquivoJasper, parametroMap, conexao_H2);
        JasperViewer.setDefaultLookAndFeelDecorated(false);

        JasperViewer j = new JasperViewer(rel, true);
        JDialog v = new JDialog(new javax.swing.JFrame(), nomeRelatorio, true);
        v.setSize(850, 700);
        v.setLocationRelativeTo(null);
        v.getContentPane().add(j.getContentPane());
        v.setVisible(true);

    } catch (final JRException e) {
        JOptionPane.showMessageDialog(null, "Relatório não encontrado!", "Relatorio", JOptionPane.ERROR_MESSAGE);
    System.out.println(e);
    }
}

[/code]

parametroMap.put("ParametroMunicipio", municipio); parametroMap.put("ParametroRota", rota);

talvez?

att,

perfeito…

acabei de fazer aqui assim:

HashMap parametroMapMunicipioRota = new HashMap(); parametroMapMunicipioRota.put("ParametroMunicipio", municipio); parametroMapMunicipioRota.put("ParametroRota", rota);

vou testar aqui!