title: JasperReports and custom data sources
body: <p>I'm looking at embedding JasperReports into an existing web app for reporting.  The webapp sits on top of an existing database which is ancient and complex, and really not suitable for report writers to use to write reports against directly.</p>
  
  <p>What I want to look at is writing some kind of wrapper around our existing data access layer (<em>written to make our life easier talking to aforementioned ancient and complex db</em>).  Does anyone have any experience of writing custom data sources for JasperResports, or of doing anything like this?</p>
  
  <p><strong>Updated</strong></p>
  
  <p>I guess I probably wasn't clear in my question - which is probably because my requirements aren't clear either.  I want to provide some way that the end-users can use something like iReport to author reports against the database, and then to use JasperReportServer for scheduling/viewing of the reports.  However, the database is really, really nasty and was never designed for use in this way.  We've got a access layer around it that the webapp uses to talk to it.  I want to keep my end users away from the DB altogether, and the idea of a custom data source that used the access layer seemed a good option.  However, I've found very little documentation on how to do that.  Maybe it's just a whole lot easier than I think it is, and I'm just trying to make a dead simple thing too complicated.</p>
  
  <p><strong>Updated</strong></p>
  
  <p>Thanks for the answers.  I don't think my problem has been solved, but I think the answers have helped to inform the requirements phase.</p>