dogfuel Posted September 9, 2007 Share Posted September 9, 2007 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 More sharing options...
csbac Posted September 11, 2007 Share Posted September 11, 2007 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 asnew 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 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