JRXML / Can we access the SQL query which is being included in jrxml can be read externally either from another source like xml or text file where if we want to support 2 databases using the single application




I have an issue where to generate the pdf we are using jrxml to build the report.To build the report we are using sql query in jrxml to get the required data in report.

But now we want to support 2 databases where the sql query syntax will be different so based on database connectio the query has to be feteched from another source of file like xml or text file.

is there any possiblity we have in building jrxml . Please respond asap.  

lahari.veerlapati's picture
Joined: Sep 16 2019 - 5:11am
Last seen: 10 months 3 weeks ago

1 Answer:



If it is in the same report you need to use a subreport, to print different data or to retrieve data via variables.

You should have a look at the jasper ultimate guide first.



Yann22300's picture
Joined: Apr 29 2015 - 1:10am
Last seen: 3 months 5 days ago