I have a question that relates to database transaction processing in JasperReports Server (5.6).
- I have a report that contains three SQL queries (in this case MS SQL through JDBC): one master query and two chart queries.
- I want to make sure that all queries are operating against the same database instance. That is, if the database is getting updated at the moment that these three queries are getting made, I want to make sure there is consistency in the data across all queries.
My current understanding is that all queries are automatically wrapped in a database transaction (e.g., BEGIN TRAN | TRANSACTION). However, this could mean that, in the example above, the database could get updated at any point between the three discrete report queries.
So, my question is this:
How can I "wrap" my report--at the report level--in a database transaction such that there is data integrity between ALL queries at the report level?