Can Jaspersoft Studio Create a report that allows for user-entered text parameters?

0
I am using TIBCO Jaspersoft® Studio - Visual Designer for JasperReports. 6.2.1
 
All of the reports that I've worked with earlier have either had no parameters (rare) or they have a query-generated parameter list from which the operator chooses one to many values.
Is there any way to give the opertor a blank entry line?  They want to enter the selection criteria as comma separated list of values.  
Meanwhile, I am also trying to verify that I can take that comman separated list of values, recreate it as an array and use it in $X{IN, field_name, array_name) statement.
However, first I need to find out if the input control can be a blank line for operator-entered-data.

 

NCHASHIM's picture
Joined: Oct 11 2016 - 1:34pm
Last seen: 1 month 3 weeks ago

1 Answer:

0

hi pal!

insert 'Yes you can! just do it!' meme lol

first u have to query normally, fix data case like "select * from dual where dummy = 'X' " when initiate new reports
then in the left bottom outline box, theres parameter.
u can create ur parameter there and chose its type in the properties in right bottom.
also dont forget to make it always prompt in the properties
if done, lets say the param u create is "INPUT_TEXT"

then right click the report and change the query to "select * from dual where dummy = $P{INPUT_TEXT}" ($P{} stands for parameters)
the next time u execute the report there will be input type text asking an input before the report generate.

use that knowledge anywhere u need and i hope that helps!

*note : after change the query make sure to 'read fields' to make sure theres no error.

regards, TV - noobie as well :D

trvpseudo's picture
Joined: Jan 30 2019 - 11:02pm
Last seen: 1 month 3 weeks ago
Feedback
randomness