ramich Posted May 11, 2015 Share Posted May 11, 2015 Hello,How to pass a dataset as the default value of a parameter for a subreport? Link to comment Share on other sites More sharing options...
butlerc Posted May 11, 2015 Share Posted May 11, 2015 Do you mean how to pass a parameter to a subreport... If so just goto subreport properties and use the Parameters option and pass in either a field, variable or expression for the parameter. Link to comment Share on other sites More sharing options...
ramich Posted May 11, 2015 Author Share Posted May 11, 2015 No i mean i want to create a parameter with type JRDataSource has as default value a subdaset from the main report and pass it to the subreport Link to comment Share on other sites More sharing options...
butlerc Posted May 11, 2015 Share Posted May 11, 2015 please explain more clearly, i can't understand - happy to help you out if you take time to clearly document what you are trying to achieve. Link to comment Share on other sites More sharing options...
ramich Posted May 11, 2015 Author Share Posted May 11, 2015 I try to create a report that contain a subreport my report has as a dataSource d1 the subreport has a dataSource d2 when i compile the report i have nullPointer exeception as an errorNB: dataSource expression is elasticSearch Link to comment Share on other sites More sharing options...
butlerc Posted May 11, 2015 Share Posted May 11, 2015 set the connection expression on your subreport to $P{REPORT_CONNECTION} Link to comment Share on other sites More sharing options...
ramich Posted May 11, 2015 Author Share Posted May 11, 2015 That's i did i need to make an exmple like this forum http://junaedhalim.blogspot.com/2009/12/creating-jasperreport-with-subreports.html 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