Jump to content
We've recently updated our Privacy Statement, available here ×

How to create a drop down list filter for the parameter in Jasper studio


vipatil

Recommended Posts

Hello,

I have created a report in Jasper Studio by using a store procedure which is created in MSSQL. 

The report has been created by passing the query and parameters in DataSet and Query Dialog box. For example;

[reporting].[xyzproc] 'UniqueIndentifier, $x, $y, $z   

$x and $y are ReportStartDate and ReportEndDate while for $z I have made it hardcode that is I pass NULL, it will select the by default values under it.

What I want to achieve is when I hit the preview button, I want the user to select StartDate and EndDate which is actually happening already, but I also want now that $z should be drop down list and the user must be able to select the values in the list so that they get a filetered data for which they want the report.

Looking for a solution or reference to achieve it.

 

 

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Jaspersoft Studio is just a editor to generate jrxml file. It's not a web page creator. In the preview mode, there's a feature to allow parameters to be entered but this is just a feature of Jaspersoft Studio and not of jrxml file (i.e. report).

Drop down feature that you're probably looking for is supported by JasperReports Server.

http://community.jaspersoft.com/documentation/tibco-jasperreports-server-community-project-administrator-guide/v630/lists-values

Link to comment
Share on other sites

@Hozawa

Thanks for the reply.

I am aware that in the preview mode, there is a feature to allow parameters to be entered. But what do I have to do if I have I want to select specific value from the parameter selected.

For example, If the parameter in preview mode is City, and I need a drop down list for that parameter where I could select the cities I want from the list.

 

Link to comment
Share on other sites

Hello Mariano,

I have been through the article you have shared. I am stuck in the part where I have to edit the query.

I have created a report out of MSSQL store procedure by the follwing way;

[reporting].[xyzproc] $P{param1},$P{param2}$P{param3}  --This is a way of calling store proc in Studio

Now the article you have shared, asks us to use $X{IN,dbfieldName,CascadingParameter}, I am not able to understand how do I edit the [reporting].[xyzproc] $P{param1},$P{param2}$P{param3} and use the multilist parameter

 

Link to comment
Share on other sites

Create two query in jasperserver:

  - First with master query, countrys.

  - Second with slave query depending on parameter retrieved from first query.

Now create two input controls, with its parameters inside Report Unit.

  - First input control single select first query

  - Second input control single or multiple select with second query.

JasperServer refresh second input control automatically when change first input control.

Mariano

Link to comment
Share on other sites

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...