peter_tonev Posted July 17, 2013 Share Posted July 17, 2013 Hello community,I saw this question was already asked before, but not really answered yet.Can one define parameters within iReport (NOT JasperServer !) which are dynamically populated (e.g. by assigning a field from the report query to the parameter list or by defining a SQL query for doing this)?The idea is - as the report gets executed, the user gets a parameter prompt and is able to select a value for the parameter from the list populated by the SQL query.As I regard this as a basic reporting funtionality, I'm looking for a straightforward solution i.e. without having to program it myself.Thanks & best regards,Peter Link to comment Share on other sites More sharing options...
pssp25 Posted July 17, 2013 Share Posted July 17, 2013 Hi Peter,Adding a Report paramater:PARAMETER_NAMEand using P!{PARAMETER_NAME} in the SQL should work.Check also the report compilation language. Let me know if it helps,Paulo Link to comment Share on other sites More sharing options...
Ankur Gupta Posted July 18, 2013 Share Posted July 18, 2013 Hi Paulo and Peter,I think this won't work as the above stated method is to provide dynamic addition to the query . But , what Peter has asked is that can we have a UI like Jasper Report for choosing from the list Dropdown or something like that isn't it?I am afraid that, jasperserver like UI is not possible , I never came accross such thing. For using the UI we need to use jasper sever.if its possible then there isn't a straightforward solutions would require some workaround,maybe through coding.Here in the iReport moreover parameter are of single value type is provided not by the query but directly they need tp be entered by the user, so query cannot be used to obtain the parameter list in iReport as we can do in the jasperserver, but parameter can be used in the query as shown above by paulo,which I think is not you requirement,Hope that it helpsThanks,Ankur Gupta Link to comment Share on other sites More sharing options...
peter_tonev Posted July 18, 2013 Author Share Posted July 18, 2013 Hi Paulo, thanks for your reply; however your syntax would - as Ankur says below - add dynamically some part of the query at runtime. My requirement is though to fetch the values for a parameter from a SQL query or data field before at customizing time, i.e. before the report is run. Other reporting suites offer that (dynamically created LOVs, dynamic parameter and other descriptions exist). I know this is possible with JasperServer, but my goal was to achieve this with iReport. Many thanks anyway. Regards, Peter Link to comment Share on other sites More sharing options...
peter_tonev Posted July 18, 2013 Author Share Posted July 18, 2013 Thanks Ankur, I guess I'd have to do this using JRS and not iReport. Do you know if such dynamic lists for parameters are possible generally with a (JRXML-based) JasperReport, e.g. by modifying the XML template directly without using iReport? Thanks, Peter 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