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

Recommended Posts

Hello,

i want to use dynamic dates (http://community.jaspersoft.com/wiki/dynamic-dates-reports) to create a input control list with "Yesterday, Last Month,etc"

I build the class and in iReprt it works great. (import the jar file). Then i deploy the report on the jasperserver and also uploaded the jar file. but now there are no visible input controls.

please can you help me?

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an "input control" with type "single select query".

Enter a SQL query to select the date values you want, like "to day", "yesterday" and "last month" like:

select current_date() as id, 'Today' as name
union
select date_sub(current_date(), interval 1 day) as id, 'Yesterday' as name
union
select date_sub(current_date(), interval 1 month) as id, 'Last month' as name
 

You can add as much "union select..." as you want

Link to comment
Share on other sites

When you deploy the report to the server, you also need to create input controls....did you do this?  In iReport the parameters are prompted for, but in the server you must create an input control with the same name as the Parameter to get it to show up.  If you right click on the reports in the repository and click edit, you will see under Controls and Resources if there are any input controls defined.

Link to comment
Share on other sites

Just a warning: One drawback of this option vs. the option in the link within the question is that when you schedule the report, the date in this case will be static based on the date the schedule is created rather than having a date based on the execution date. All this being said, the next release of the server (version 5) will offer relative dates out of the box! ;-)
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...