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

JasperReports and Web Application


phillips1021

Recommended Posts

I'm able to get the web application demo to run just fine. However, that demo just uses a single report. I need to have a main report and a sub-report in my web application.

 

But when I add a sub-report to the main report that uses an new JRBeanCollectionDataSource as the datasource expression I get an error:

 

javax.servlet.ServletException: javax.servlet.ServletException: Error evaluating expression : Source text : new JRBeanCollectionDataSource($F{phones})

 

The JasperReport main and sub-report works fine in iReport. They also work fine in just a plain java application.

 

Any help would be greatly appreciated on how to use a sub-report with a main report in a web application.

Post edited by: phillips1021, at: 2008/07/12 22:58

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Thanks to some great help from Dave Newton, I was able to figure out how to use Struts2, JasperReports, a main report and a sub-report in my web application.

 

I blogged about how I got it all to work here:

 

http://tinyurl.com/5h7nvv

 

 

on my blog at http://www.brucephillips.name/blog

.

 

In that blog entry you can download a complete war file with source code including the .jrxml files.

 

Bruce

Link to comment
Share on other sites

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...