Jump to content
We've recently updated our Privacy Statement, available here ×

No query executer factory registered for the "MongoDbQuery" language


kubrauzan

Recommended Posts

I want to use my mongo collection and report this. 

But I get this error: Caused by: net.sf.jasperreports.engine.JRRuntimeException: No query executer factory registered for the "MongoDbQuery" language.

My controller:
How can I fix this issue?


 

@GetMapping("/report")
public byte[] generateReport() throws Exception {
    try{
        List<AssignmentDTO> assignmentDTOList= assignmentService.findAll();
        Map<String, Object> params= new HashMap<String, Object>();
        params.put("CompanyName", "Uzan");
        params.put("AssignmentList", new JRBeanCollectionDataSource(assignmentDTOList));

        JasperPrint jasperPrint= JasperFillManager.fillReport(JasperCompileManager.compileReport(ResourceUtils
                .getFile("classpath:books_count_pie.jrxml").getAbsolutePath()), params, new JREmptyDataSource());

        return new ResponseEntity<byte[]>(JasperExportManager.exportReportToPdf(jasperPrint), null, HttpStatus.OK).getBody();
    }
    catch (Exception e){
        return new ResponseEntity<byte[]>(HttpStatus.INTERNAL_SERVER_ERROR).getBody();
    }
}
Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...