Select datasource, then parameters in JasperServer


I use an application for which I create a new database each year, therefore I have some archives of databases from previous years.

I would like to know if it is possible in JasperServer that when I want to print a report I can FIRST select a datasource (e.g. 2015, 2014, ...) and THEN select the parameters (e.g. which products, invoices,...). It becomes difficult because some parameters are lists of records taken from a database, then these parameters lists must be updated in function of the database I choose.

Is it possible to do something like this? If yes how (in iReport and then in JasperServer)? If no, do you see another mean that can replace it?

Thanks in advance,


younos's picture
Joined: Mar 19 2014 - 6:48am
Last seen: 7 years 8 months ago

2 Answers:

Please go through this link

JRS has feature called profile attribute in which different values be defined for attribute at different level (server, tenant, user). I am not 100% sure if this will solve your problem but this is worth a look. The link is for v55 but 6.0 and beyond presents more addition to the feature. Those attributes can be used in datasource/domain/adhoc/filter as of amber -2. (which is the work in progress) 

nthapa's picture
Joined: Jan 24 2014 - 9:53am
Last seen: 6 years 4 months ago

You can use the user-defined data source function in Jasper to switch among data sources dynamically according to the parameter.

This approach requires creating a JAVA class.

Try using esProc to help with Jasper if you feel this is too hard. Please refer to .

calculate.machine's picture
Joined: Jan 13 2015 - 11:40pm
Last seen: 6 years 10 months ago