Jump to content

Howto submit a date-parameter to exec a report via Rest-v2?


migmedia
Go to solution Solved by migmedia,

Recommended Posts

Hi,

I want to execute a report by ReST-2 with a date as a mandatory parameter: 

 curl -u user:password http://jasper:8080/jasperserver/rest_v2/reports/testReport.csv?start_date=2013-03-01

Returns

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><errors><error><defaultmessage>Geben Sie einen gültigen Wert für den Typ 'Date' an.</defaultmessage><errorcode>fillParameters.error.invalidValueForType</errorcode></error></errors>

 

What is the correct formating of the date for the GET-Parameter?

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

The format you are using should be correct for a regular date parameter, For example try this on the freight report (comes with the samples) as an example http://localhost:8080/jasperserver-pro/rest_v2/reports/reports/samples/Freight.html?RequestDate=1998-06-01

The problem may be that your parameter is defined as a date-time instead of a date.

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