Inside the NetBeans IDE, the code works and the report is displayed. But when generating the executable, it is not possible to open the report, receiving the null message. It's like he can not find the report.
public ClienteREL() {
this.path = this.getClass().getClassLoader().getResource("").getPath();
this.pathToReportPackage = this.path + "br/com/prologica/report/";
System.out.println(this.pathToReportPackage);
}
//Imprime/gera uma lista de Clientes
public void imprimir(List<Cliente> clientes) throws Exception
{
JasperReport report = JasperCompileManager.compileReport(this.getPathToReportPackage() + "imprimir.jrxml");
JasperPrint print = JasperFillManager.fillReport(report, null, new JRBeanCollectionDataSource(clientes));
JasperPrintManager jasperPrintManager = null;
jasperPrintManager.printReport(print, false);
}