Generally we deal with date input controls in our reports...
Here is the stuff related to date input controls..
* Parameters in iReport Designer are called as input controls in JasperServer Repository.
* Generally we use start_date and end_date (OR) from_date and to_date.
start_date:
Give the properties as shown in the figure:
Name: start_date
Parameter Class : java.util.Date
Use as a prompt : Check this box
Default Value Expression : new SimpleDateFormat("yyyy-MM-dd").format(new Date().getTime() - 7 * 24 * 60 * 60 * 1000)
Description : Write your description
Properties : Add properties if you want any in your report parameter.
NOTE: In Default Value Expression we are taking the start date as one week back from the current date. i.e, from current date to 7 days back.
end_date:
* As shown in figure we are giving Default Value Expression as Current date. i.e, new Date() function brings out current date(i.e, todays date).
NOTE:
* The names of the parameters and ID's of the input controls in jasperServer repository should match one another.
i.e, parameter names in Report Designer = ID's in input controls of JasperServer Repository
Useful other posts:
Thanks ...
Have fun with date input controls :) :) :)
Great Post
ReplyDeleteI have feeling good after reading this post its so awesome post, Thanks Buddy
this post answer my problem, thanks you very much. keep your awesome posting
ReplyDeletethis post answer my problem, thanks you very much. keep your awesome posting
ReplyDelete