george_17 Posted August 18, 2017 Share Posted August 18, 2017 Hi allI have had some excellent advice here and really appreciate sharing the knowledge.I now need to understand how to write a report like select * from table x where date = a date entered by the usercan anyone tell me how to do this please??many thanks george Link to comment Share on other sites More sharing options...
george_17 Posted August 19, 2017 Author Share Posted August 19, 2017 see my new post re prompted parameters Link to comment Share on other sites More sharing options...
darth_fader Posted August 20, 2017 Share Posted August 20, 2017 user specified inputs are passed to a report via "parameters", there are tons of examples online you can use as a guide if it's your first time setting this up. You can reference those parameters in your query to get data filtered by user input. if you're using jasper server, there are two steps. You need to create an input control and associate that to your published report, then you need a parameter defined in your jrxml that has a matching id with the input control. That's how jasper knows to correlate a server input with a report parameter. Again, lots of good info online via tutorials, and step by step videos on youtube. select * from table x where date = $P{date}- date is a parameter defined in the report jrxml and referenced in the query; you can test this out on jasper studio very quickly 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