Now that you have added Jasper Report support, is it possible to generate a report that has an SQL query embedded in it? How would I pass in the database connection in that case?
JasperReports support does not provide direct access from report to DB. It creates a datasource with the data from report bands and passes this datasource to the template. So, answering your question, it is not possible.