kavita.negi Posted October 12, 2013 Share Posted October 12, 2013 I have a custom bean source and in the bean I have a list of integers.Now I want to pass that list as parameter to subreport to use inside the query of the subreport .How to achieve this. Kind regards,Kavita Link to comment Share on other sites More sharing options...
C-Box Posted October 12, 2013 Share Posted October 12, 2013 Pass the Field that holds your IDs as so called SubReportParameter (you will find them in iReport SubReportProerties almost of the end of the property panel)note that the (subreport)parameter name must match 100% and is case sensitive!hthC-Box Link to comment Share on other sites More sharing options...
kavita.negi Posted October 13, 2013 Author Share Posted October 13, 2013 Please could you provide some ireport screenshot for setting parameter Link to comment Share on other sites More sharing options...
C-Box Posted October 14, 2013 Share Posted October 14, 2013 here a screenshot from a simple SubReport Parameter... hthC-Box Link to comment Share on other sites More sharing options...
kavita.negi Posted October 15, 2013 Author Share Posted October 15, 2013 I have a query that returns the name of employees select emp_name from employee ,it returns 5 names and the type automatically of emp_name is string. While Showing in main report ,the whole report iterate for each record. I want to know that is there any way to pass these employee names as a collection to subreport .I am trying too much bu could not find any solution it. Tell me whether it is possible or not .Or we have to use some other datasource to create it . Link to comment Share on other sites More sharing options...
C-Box Posted October 15, 2013 Share Posted October 15, 2013 Hi,well you could either pass the report connection to the subreport and (re)call the data from datasource with the same query again (if it's needed at each employee level from MasterReport again)..... or you could also collect all your employee names into a variable (e.g. via add($F{name}) method for ArrayList<String>) and pass this variable to a subreport via parameter at the end of the master-report (e.g, summary band or a dummy groupfooter band). There you could evaluate the parameter again and design your SubReport as needed. There's more than one way to skin a cat. http://community.jaspersoft.com/sites/all/libraries/ckeditor/plugins/smiley/images/wink_smile.gifthth + regards from GermanyC-Box Link to comment Share on other sites More sharing options...
kavita.negi Posted October 15, 2013 Author Share Posted October 15, 2013 OK one question regarding custom bean source while deploying to jasper server custom jre source do not show any data .Please Help. 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