monu.mehta1 Posted November 27, 2015 Share Posted November 27, 2015 Hi, I am using TIBCO jasperStudio 6.1.0.I want to create a report where user can enter comma separted values for given paramter and based on those values my report query should give the result.Suppose my report query is select * from employee where X{IN,eid,eid_list};eid_list is of java.util.List type.Here I want while running report, Input prompt should be able ask for the values and user should be able to enter the the comma separated values by her/himself for that paramter{eid_list} though input control.like {23,12,34,.........} and then based on those given values my report should give the result.Anybody Can please help me. Link to comment Share on other sites More sharing options...
frederic.castelain Posted January 27, 2023 Share Posted January 27, 2023 Define a parameter p_split_param which is of type java.lang.String[], and 'isForPrompting="false" 'In this p_split_param parameter, put either an empty array (new String[0]) if your real input parameter is empty, $P{your_input_param}.split(",") otherwise:"".equals($P{P_REAL_INPUT_PARAM}) ? new String[0] : $P{P_REAL_INPUT_PARAM}.split(",") In a dummy P_WHERE_CLAUSE parameter (= isForPrompting="false" ), put: $P{p_split_param}.length == 0 ? " " : " WHERE $X{IN, table_id_column, p_split_param}In your queryString put:select ... from ...$P!{P_WHERE_CLAUSE} 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