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

How to create a parameter to filter data-response will be greatly appreciated


zsy2053

Recommended Posts

Hello, I'm using jasper studio right now, and I want to create parameter that users can use to filter the data. For example, if a user want to see the number of buses from 2015/6/6 12:00:00 to 2015/6/12 13:00:00, he can just type the date and time on the page, then the corresponding data will be displayed. How can I do that, I know I can use BIRT to achieve this purpose, in BIRT, I can use a contional SQL like:

select count(distinct ttc.vehicle_id) as vc,ttc.routeTag,ttc_routes.title,ttc.dateTime
from ttc
INNER JOIN ttc_routes ON ttc.routeTag = ttc_routes.routeTag
WHERE ttc.dateTime >= TIMESTAMP(?,?) and ttc.dateTime <= TIMESTAMP(?,?)
GROUP BY ttc_routes.title
order by vc desc
limit 10
 
Then, I can set the parameter to control the time range. Could anyone tell me how can I do the same thing in Jasper?
Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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