Jump to content

Date Parameter passed in JasperServer 4.5 - 4.7


davidbhybrid

Recommended Posts

Did something change in the way that dates are passed in a URL with Jasperserver 4.5 and higher?

I have a URL to call a report which contains 2 date parameters. The URL works perfectly in 4.2.1, but does not in anything above 4.5. When using 4.2.1, the report generates in my browser as expected; using 4.5 and higher, i get nothing in my browser. I have looked through the logs and could not see anything out of the ordinary.

I took my investigation one step further and hardcoded my date in the query of my report, removed the date parameters from the URL and the report generated as expected.

The working URL (with the date parameters) is as follows:

http://localhost:7080/jasperserver/flow.html?_flowId=viewReportFlow&standAlone=true&_flowId=viewReportFlow&ParentFolderUri=%2Freports&reportUnit=%2Freports%2Fdonotshipreport&j_username=jasperadmin&j_password=jasperadmin&start_date=20121101000000&end_date=20121130000000&output=pdf

Any help would be greatly appreciated.

Thanks in advance!

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

You need to format date before passed it to the another report.

E.g  Startdate is my parameter whose datatype is date.

Whle passing date through url it goes into 20121206000000 in this format so format data before passed it to the url. i.e In hyperlink parameter mapping.

set datatype is string & format like extract year, month , date using java functions& arrange like  year+"-"+month+"-"+date. So that date passed through url like 2012-12-06 & hyperlink reports get valid date format.

This is not a solution, this is workarround which i did in my reports.when i migrate my reports from 4.5 to 4.7

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