Jump to content
We've recently updated our Privacy Statement, available here ×

must be missing the obvious ...


dogfuel

Recommended Posts

Trying to use the JasperServer calendar prompt with a MySql database. I have tried using a second string prompt in my query with no prompt for it and a default of:

 

Code:
new SimpleDateFormat("yyyy-MM-dd"«»).format($P{JavaDteFrom})

 

My report displays with "no data ..." in both iReport and through JasperServer.

 

Am I missing something obvious?

 

Thanks!

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi!

Put a field onto the report that displays the value of the parameter; then, you can check whether the query should return any data with this value.

 

Also, it might be a good idea to use java.util.Date, not String, for the parameter type, and default values such as

new java.util.Date()

new java.util.Date(0)

new java.util.Date(new java.util.Date()-30l*24*3600*1000)

(one month back, take care of the "l" (L) after 30)

 

Hope this helps,

Sebastian

 

PS: Added a *1000, as those are msecs.

Post edited by: csbac, at: 2007/09/11 16:31

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