When running a Jasper report in which the SQL is embedded in the report file (.jrxml), is it possible to see the SQL that is executed? Ideally, I'd also like to see the values that are substituted for each of the $P{} placeholders.
Cheers,
Don
Click on manage->server settings->Ad-hoc settings-> Select Enable view query in Ad-hoc editor. Create ad-hoc view, one button will be enabled to see query. Click that and get query.
At JasperReports levelIn <jasperserver-root>/WEB-IN/classes you can find the file jasperreports. properties. This is the file that you need to modify to set some properties to the value you want for all reports running in JasperReports Server. Similarly you can set some properties at iReport level.
JasperReports uses the Jakarta Commons Logging API. Commons Logging has a discovery mechanism that connects to logging API you are using in your project.
You need to configure logger named "net.sf.jasperreports" in your logging configuration file to control the logging level of JasperReports.
If you are using Log4j, you can read this section of there documentation for exact details.
For example you may write something like this in log4j.properties file
log4j.logger.net.sf.jasperreports=INFO, Daily
Where "Daily" is name of an appender configured in same properties file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With