0
I am making a small system to print a budget by passing the id as parameter. The following situation occurs; By netbeans step id when prompted and normal report appears.
But when I do generate the report by my program it brings so:
My method that generates the report:
public void imprimeRelatorio() {
ConexaoMySql co = new ConexaoMySql();
co.setUrl("jdbc:mysql://localhost:3306/poc");
co.setUsuario("root");
co.setSenha("");
String src = "C:\\Users\\Administrador\\Documents\\Eduardo\\ControleOrcamento\\src\\vendas\\orcamento.jasper";
Map<String, Object> parametros = new HashMap<String, Object>();
parametros.put("id", (Integer.parseInt(inpId.getText())));
JasperPrint jasperPrint = null;
try {
jasperPrint = JasperFillManager.fillReport(src, parametros, co.getConnection());
} catch (JRException ex) {
Logger.getLogger(TelaControle.class.getName()).log(Level.SEVERE, null, ex);
}
JasperViewer view = new JasperViewer(jasperPrint, false);
view.setVisible(true);
}