Storing query and database connection in JRXML using iReport

I can add a query to my report with iReport, and at the preview tab the query runs fine, and everything goes well. When exploring th XML code in XML tab, I can find the query. However, I am not able to locate where the database connection properties. Is there any idea about how I can embed the data connection properties into the JRXML?

Any help is appreciated,

Hani

hanidraidi's picture
Joined: Feb 21 2018 - 7:18am
Last seen: 2 months 2 weeks ago

2 Answers:

Data connection is not included in the jrxml. This is a feature that enables JasperReports jrxml to be portable to different environment.

For example, when the jrxml created on Jaspersoft Studio is saved to JasperReports Server, it may be using a different data connection but the jrxml still is OK.

hozawa's picture
190307
Joined: Apr 24 2010 - 4:31pm
Last seen: 4 years 3 months ago

If you publish your report to the server, and export the report file, you will get a zip file. In this zip file you can find a separate xml file defining the data source.

Data source won't be stored in the main.jrxml file.

riodavid's picture
2959
Joined: Oct 27 2016 - 1:57am
Last seen: 4 years 10 months ago
Feedback