dynamic dates jasperserver

0

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?

q16marvin's picture
Joined: Nov 6 2012 - 9:39am
Last seen: 3 years 8 months ago

3 Answers:

0

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

jme14's picture
20
Joined: Sep 20 2007 - 5:58am
Last seen: 3 years 12 months ago
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! ;-)
mgeise - 6 years 9 months ago
0

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.

mgeise's picture
18324
Joined: Mar 5 2007 - 6:18am
Last seen: 1 day 7 hours ago
0

Yes of course i definded the controls in the setting of the report (i also have much more parameters). But the hole parameter list ist empty. after i delete the control and the parameter in ireport the report on the server works...

q16marvin's picture
Joined: Nov 6 2012 - 9:39am
Last seen: 3 years 8 months ago
Feedback
randomness