Announcement Announcement Module
No announcement yet.
Integration with Jasper engine Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Integration with Jasper engine

    I have been trying to integrate with the Jasper type view.
    I have successfully passed my own List as the model and the reports render fine.

    Going through the code I realized I could use the embeded query and then it will use the configured DataSource but if I were using a 3 tiered architecture, would not be feasible (I am not but don;t want to preclude it for the future).

    I started thinking and figued what I really want to do is access the query defined in the report, run that myself (in case the web server is not directly talking to the database) and then pass the model to the view.

    I am looking up the viewResolver and getting the jasper view. I will sub class the View class to allow me getting access to the Jasper Report object so I can access the query string. I can then run that and create a JRDataSource from the resultset or use the tools to do that (not really investigated that part yet).

    Does it sound resonable and is there a better way of doing that?

    While I am there, thanks to whomever for openning the BindTag.


  • #2
    Why do you want to run the query yourself? You can simply the configure the JDBC data source as a property on the View class in your configuration and then let the report engine execute the query. This seems to be a perfectly acceptable approach to me - no real need to get domain objects or a business tier involved for reporting.



    • #3
      Well if the web server is talking to EJBs I don't really want the web server to talk directly to the database.

      Otherwise I agree.

      Thanks for answering