Jump to content

Recommended Posts

Posted

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.

 

 

 

  • 7 years later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

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}

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...