Jump to content
Changes to the Jaspersoft community edition download ×

How to define an inputControl via REST for each parameter in a report


james.stern

Recommended Posts

Hello.  Say I have a report with 3 parameters, p1, p2, and p3.  Let's say p1 and p2 are Text but p3 is a Date.  How do I define an inputControl for each of these parameters using REST V2?  Also, I'd like to set the overwrite flag on each inputControl.

The Web Services Guide explains how to give an inputControl a value once the inputControl exists but I don't understand how to create the inputControl.  Is there a way to do this via REST V2 and JSON?  If so, how?

Thank you.

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

The report input control should be defined as parameter when you create a report template JRXML file, or as a filter when report is created from ad hoc view designer. Once the inoput control is defined in your report, you can reference it in your REST_V2 report service GET request as argument. For example:

http://<host>:<port>/jasperserver[-pro]/rest_v2/reports/path/to/report.<format>?<arguments>

Both date-only and timestamp fields used in the argument should be given in the ISO date-time format such as 1997-01-01T04:05:06+02:00. Please refer to TIBCO JASPERREPORTS® SERVER WEB SERVICES GUIDE RELEASE 6.0 for detail.

Sample URL used in REST_V2 GET request:

http://localhost:8080/jasperserver-pro/rest_v2/reports/your_report.html?p1=text1&p2=text2&p3=2015-03-19T00:00:00+08:00[/code]
Link to comment
Share on other sites

  • 2 years later...
  • 11 months later...

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