How do i pass a date as input control

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.

 

sabrish.jackson007_1's picture
Joined: Jul 26 2017 - 4:20am
Last seen: 5 years 9 months ago

.

nicolas.veilleux - 5 years 10 months ago

2 Answers:

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.

nicolas.veilleux's picture
Joined: Jul 13 2017 - 5:22am
Last seen: 5 years 8 months ago

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

tamara.berova's picture
Joined: Feb 19 2016 - 12:29am
Last seen: 5 years 9 months ago
Feedback