• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Where to put jasper reports - front end or ejb business tier?

Sib Pete
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi there,

I am trying to use Jasper Reports (v3.5.2) to generate and print reports in PDF/HTML to the browser for a webapp. This webapp already uses JSF(Woodstock) for the front end and EJB 3 (with JPA and Hibernate as persistence provider to a MySQL db).

My question is - where should the code for generating the Jasper based reports be at? I am totally confused about this. Should I put it in the JSF front end? Or should it be a "report" module in the business logic as session beans?

I would think that the right place for this is the business tier as a separate module. I would call a business method with the name of the report, input parameter map and report format as parameters to the business method and would get the generated pdf/html in return which I could then send to the browser. Am I on the right track with this?

Can you suggest a pattern for how to go about doing this?

Also, I would like to use EJBQL since I am already using JPA.

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic