How do i pass a date as input control
Posted on July 27, 2017 at 9:44pm
Hi All,
I am trying to execute a .jrxml file using JasperReport Server.
My Report.jrxml file prompts for user input while executing.
We need to pass the START_DATE and END_DATE values.
START_DATE should be yesterday's date and END_DATE should also be yesterday's date. And it should be scheduled in such a way, if it runs the report TODAY, it should get the parameters as yesterday's date, and if it runs tomorrow, it should get today's date and so on. How could this be acheived?
How could i pass the start and end date as the parameters using JasperReport Server. Could anyone please let me know the steps to be followed.
Joined: Jul 26 2017 - 4:20am
Last seen: 5 years 9 months ago
Posted on July 28, 2017 at 1:35am
For example, you can pass a string (as parameter) who represents a date. After in your rapport, you can build a java.sql.util.Date with this string representation.
You can import <import value="org.apache.commons.lang.time.*"/> to use DateUtils in expressions.
Joined: Jul 13 2017 - 5:22am
Last seen: 5 years 8 months ago
Posted on July 31, 2017 at 5:41am
Hi!
From Version 6.3.0 JasperSoft can work with the class java.util.date. This one get Date and set Date. You must only describe your Text Field or variable in Report accordingly.
Best Regards
Tamara Berova
Joined: Feb 19 2016 - 12:29am
Last seen: 5 years 9 months ago
.