Duvida Ireport

Boa Tarde…
Galera com algumas consultas montei esse relatorio, mas minha duvida e a seguinte. Como poderia fazer pra que o usuario entre com o numero a ser pesquisado. Do modo que esta ele me traz o relatorio com o valor que esta determinado no parameterMap.put. Agradeço quem clarear minhas ideias.

public class Main {

	public static void main(String[] args) {
		Connection conn = null;

		try {
			 //cria a conexão com o banco de dados
			Class.forName("com.mysql.jdbc.Driver");
			String db = "jdbc:mysql://localhost:3306/relatorios";
			conn = DriverManager.getConnection(db,"root","123");

			System.out.println("Gerando relatório...");

			HashMap<String, Integer> parameterMap = 
						new HashMap<String, Integer>( );
			 //o Nome do parâmetro e o valor é passado ao HashMap
			parameterMap.put("PAR_PEDID", 10248);

		    String path = "src/br/com/integrator/relatorio/";
		    File file = new File(path);
		    file = file.getAbsoluteFile( );
			
		    String repStr2 = file.getPath( );
		    System.out.println(repStr2);
			
			 //pega o caminho físico até o arquivo .jasper
			String arquivo = System.getProperty("user.dir") + 
				"/src/br/com/integrator/relatorio/Relatorio_Agrupado.jasper";


			
			 //chama fillReport
			JasperPrint jp = JasperFillManager.fillReport(arquivo, 
						parameterMap, conn);
			
			//exporta para o formato ODT do OpenOffice.org Writer
			JROdtExporter odtExporter = new JROdtExporter();
			odtExporter.setParameter(JRExporterParameter. 
					JASPER_PRINT, jp);
			odtExporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME,
					path + "/relatorio.odt");
			odtExporter.setParameter(JRExporterParameter.JASPER_PRINT, jp);
			odtExporter.setParameter(JRExporterParameter.OFFSET_X, new Integer(0)); 
			odtExporter.setParameter(JRExporterParameter.OFFSET_Y, new Integer(0)); 
			odtExporter.setParameter(JRExporterParameter.CHARACTER_ENCODING, "UTF-8"); 
		
//			odtExporter.exportReport();
			
			

			 //exibe o relatório com viewReport
			JasperViewer.viewReport(jp, false);
            
		} catch (SQLException ex) {
            ex.printStackTrace();
		} catch (ClassNotFoundException ex) {
            ex.printStackTrace();
		} catch (JRException e) {
            e.printStackTrace();
		} finally {
            try {
                if (!conn.isClosed()) {
                    conn.close();
                }
                System.out.println("Finalizado!");
            } catch (SQLException ex) {}
		}
	}
}

No caso específico é só passar como parâmetro do método main(), mas acredito que teu codigo esteja meio desorganizado, poderia ter algum método que fizesse isso passando o parâmetro.

public class Main {

	public static void main(String[] args) {
                if(args.length  == 0)
                   System.out.println("Voce deve passar o parametro numerico");
                else {
		Connection conn = null;
                [b]Integer parametro = args[0];[/b]
		try {
			 //cria a conexão com o banco de dados
			Class.forName("com.mysql.jdbc.Driver");
			String db = "jdbc:mysql://localhost:3306/relatorios";
			conn = DriverManager.getConnection(db,"root","123");

			System.out.println("Gerando relatório...");

			HashMap<String, Integer> parameterMap = 
						new HashMap<String, Integer>( );
			 //o Nome do parâmetro e o valor é passado ao HashMap
			parameterMap.put("PAR_PEDID", parametro);

		    String path = "src/br/com/integrator/relatorio/";
		    File file = new File(path);
		    file = file.getAbsoluteFile( );
			
		    String repStr2 = file.getPath( );
		    System.out.println(repStr2);
			
			 //pega o caminho físico até o arquivo .jasper
			String arquivo = System.getProperty("user.dir") + 
				"/src/br/com/integrator/relatorio/Relatorio_Agrupado.jasper";


			
			 //chama fillReport
			JasperPrint jp = JasperFillManager.fillReport(arquivo, 
						parameterMap, conn);
			
			//exporta para o formato ODT do OpenOffice.org Writer
			JROdtExporter odtExporter = new JROdtExporter();
			odtExporter.setParameter(JRExporterParameter. 
					JASPER_PRINT, jp);
			odtExporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME,
					path + "/relatorio.odt");
			odtExporter.setParameter(JRExporterParameter.JASPER_PRINT, jp);
			odtExporter.setParameter(JRExporterParameter.OFFSET_X, new Integer(0)); 
			odtExporter.setParameter(JRExporterParameter.OFFSET_Y, new Integer(0)); 
			odtExporter.setParameter(JRExporterParameter.CHARACTER_ENCODING, "UTF-8"); 
		
//			odtExporter.exportReport();
			
			

			 //exibe o relatório com viewReport
			JasperViewer.viewReport(jp, false);
            
		} catch (SQLException ex) {
            ex.printStackTrace();
		} catch (ClassNotFoundException ex) {
            ex.printStackTrace();
		} catch (JRException e) {
            e.printStackTrace();
		} finally {
            try {
                if (!conn.isClosed()) {
                    conn.close();
                }
                System.out.println("Finalizado!");
            } catch (SQLException ex) {}
		}
           }
	}

        
}