Estou com um problema na hora de imprimir o relatório pelo java vcs sabem o que pode ser ?
Essa é a parte que chamo o relatório:
private void menRelCliActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menRelCliActionPerformed
// gerando um relatório de clientes
int confirma = JOptionPane.showConfirmDialog(null,"Confirma a impressão deste relatório?","Atenção",JOptionPane.YES_NO_OPTION);
if (confirma == JOptionPane.YES_OPTION){
//imprimindo relatório com o framework JasperReports
try {
//Usando a classe JasperPrint para preparar a impressão de um relatório
JasperPrint print = JasperFillManager.fillReport("/br/com/infox/relatorios/clientes.jasper", null, conexao);
//a linha abaixo exibe o relatório através da classe JasperViewer
JasperViewer.viewReport(print,false);
} catch (Exception e) {
JOptionPane.showMessageDialog(null, e);
}
}
}
Esse é o erro que aparece:
net.sf.jasperreports.engine.JRException: java.io.FileNotFoundException: \br\com\infox\relatorios\clientes.jasper
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:114)
at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:103)
at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:283)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:760)
at br.com.infox.telas.TelaPrincipal.menRelCliActionPerformed(TelaPrincipal.java:262)
at br.com.infox.telas.TelaPrincipal.access$4(TelaPrincipal.java:254)
at br.com.infox.telas.TelaPrincipal$5.actionPerformed(TelaPrincipal.java:127)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: \br\com\infox\relatorios\clientes.jasper
... 45 more
