#1 2014-06-25 12:42:24

rafiga
Member
Registered: 2014-06-25

Jasper Report Passing a Dynamic value to the Jaspser query

I have a requirement to run the report on daily basis, during each I run I have to pass a dynamic value (date field) to the sql query, is there any way to pass this value in Report Server Parameter Management?

Offline

#2 2014-06-25 13:44:49

Arno Mittelbach
datenwerke
Registered: 2012-02-14

Re: Jasper Report Passing a Dynamic value to the Jaspser query

Hi,

there are several ways to do this. For one, you could simply use SQL functions. In MySQL you can for example use the CURDATE() function.
You can also solve this with ReportServer using parameters. If you add a date parameter to a report you can, when configuring the parameter
for your report variant right click on the date field and say "switch to formula". This allows you to use a ${today} expression to select a day relative to the current day.
Simply setting it to the default ${today} would pick the current day when scheduled.

Hope this helps
Arno

Offline

Board footer

Powered by FluxBB