Hi. I have TIBCO Jaspersoft® Studio 6.8.0 and Oracle's JDBC driver version 7 to connect to Oracle database XE.
I have a report with a main dataset which is based on a query. And a background image that's retrieved through a different query.
I can not add the image field of the subdataset to the background band.
So, how Add a background image from subdataset in JasperSoft Studio?
I appreciate if there's a better way to accomplish the task. Thanks.
JasperReports Library executes SQL queries only for the purpose of retrieving data source records and iterate through them.
In your case, you want to execute an SQL query just to fetch an image, which probably requires some custom code.
But one way to leverage JRL ability to fetch images from the database is to use a master report just for the background.
The master report would have the query to fetch the image as a dataset field and put it in the background section.
The actual report content is included in this master as a subreport.
This approach would solve the page margins issue you raised on a separate thread.
I hope this helps.