views:

43

answers:

1

My BIRT report retrieves data using a SQL query (JDBC datasource). My SQL Server 2005 database is set to use snapshot transaction isolation.

How do I define the transaction isolation mode in BIRT report designer ?

Programatically it's done calling the datasource method setDefaultTransactionIsolation(4096) (4096 means snapshot isolation).

+1  A: 

You handle this in the Data Source properties. After successfully creating your data source in BIRT, double-click it to edit it. Select the "Property Binding" grouping on the left of the editor. You will see a property there called "Isolation Mode". For SQL Server, you would add "SNAPSHOT".

A cool feature of BIRT actually allows this property (and all others on this screen) to be parameterized. Click the formula editory by the text box. There you can either bind the value to a report parameter (this is the most common apprach) or implement some logic to determine the desired value. This give you even more flexibility in case the requirements of the underlying data stroe shift. If/when that happens you will not have to edit your design, only alter the input parameter.

MystikSpiral
Setting "Isolation Mode" to SNAPSHOT gives the following error:Script engine error: ReferenceError: "SNAPSHOT" is not defined.The same doesn't occur if I it to set 4096.
muriloq
I believe this falls on the JDBC driver being used since SNAPSHOT is simply an alias for 4096.
MystikSpiral