Tenho um formulario de relatorios com 5 Jcheckbutton, tenho tambem o entitymanager, query, list, cada check imprimira um relatorio com a seguinte instrução
try{
String Query = “SELECT c FROM Bancos c”;
query1 = entityManager1.createQuery(Query);
list1.clear();
list1.addAll(query1.getResultList());
String path = new File(".").getCanonicalPath() + “\relatorios\repBancos.jrxml”;
JasperReport report = JasperCompileManager.compileReport(path);
JRBeanCollectionDataSource dados = new JRBeanCollectionDataSource(list1);
JasperPrint print = JasperFillManager.fillReport(report, null, dados);
JasperViewer.viewReport(print, false);
} catch (JRException ex) {
Logger.getLogger(JFrmCursos.class.getName()).log(Level.SEVERE, null, ex);
}catch (IOException ex){
System.out.println(ex.getMessage());
}
Se deixo a query em branco nas propriedades da esse erro
net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
calculator_null_1523070452433_762238: 166: expecting ‘)’, found ‘de’ @ line 166, column 31.
Como faço para cada opção passar o select de cada relatorio