elp0mme Posted January 19, 2021 Share Posted January 19, 2021 I have created a JasperReport with a parameter P_LandListe which is of type java.util.Collection, there is no Default Expression and the Report can be started from the JasperStudio by passing in values which are comma separated in the P_LandListe parameter and the results are filtered correctly.In the JasperServer I can only get the Report to filter correctly when I create an InputControl structure for example as a list or query. This was done to test the Rest API. When there is no InputControl structure the Report always returns all values as if nothing was entered in the parameter. With InputControl structure I can choose the values and it filters correctly directly in the JasperServer and when I use Postman to call the Rest API.I explicitly do not want to create an InputControl structure!!!What I want to do is pass values to the parameter without any validation happening on the JasperServer or in the Report. I can do this with all other java.lang.String parameters for example P_Event can be empty or filled with any string.I would like to do this for the Collection parameter (Multi-Select) by just passing all the values either comma separated using"POST http://jaspersrv-dev:8080/jasperserver/rest_v2/reports/reports/Test/TestMA3/inputControls/" and in Body define{"P_LandListe" : ["AD","DE","US"]}and then run the report after they have been set, or by passing the values to the parameter multiple times "GET http://jaspersrv-dev:8080/jasperserver/rest_v2/reports/reports/Test/TestMA3.html?P_LandListe=DE&P_LandListe=AD&P_LandListe=US"However this only works if I have previously defined an InputControl structure on the JasperServer for this parameter. I have even thought about creating an InputControl structure at runtime which only contains the values that I require but have not found a way of doing this.I am now asking myself if this is acutally possible and would be very very thankful for any helpful hints in how to do this. 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