lucianc Posted December 3, 2009 Share Posted December 3, 2009 xavixxxxWrote: Errors were encountered when compiling report expressions class file: 1. JRBeanCollectionDataSource cannot be resolved or is not a type Use the qualified class name, i.e. net.sf.jasperreports.engine.data.JRBeanCollectionDataSource.HTH,Lucian Link to comment Share on other sites More sharing options...
echo74 Posted February 15, 2010 Share Posted February 15, 2010 i am also having some problem with subreport. i used netbeans for development tool and i execute a report which got a subreport from the application and it worked fine. The problem it when i pass a parameter for the report and no data is being fetched. Can anyone help me with this.Thanx Link to comment Share on other sites More sharing options...
e-sarge Posted June 22, 2010 Share Posted June 22, 2010 Another old thread that is incomplete, so I'll try to complete it.The answer was almost given above, but a few details were not quite correct, which might explain why the original poster did not recognize the solution.First, your main collection class should look similar to this:Class EmpDetail {String empCode;String empName;List ProjectDetails empDetails;}Notice the list/collection in your main class which will contain the source of data for the sub-report.Then, in the main report where you define your subreport, set the Data Source Expression property to the following:new net.sf.jasperreports.engine.data.JRBeanCollectionDataSource($F{empDetails})The reference to field empDetails was key to understanding the solution and was not presented before. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now