The reporting engine sends the contents of the CommandText property of the data source as a single SelectCommand, so it is not possible to execute another statement beforehand. However, a stored procedure that sets the session_context and then returns the data set should work.
Another approach is to replace the SqlDataSource with ObjectDataSource and in its data retrieval method to execute the necessary commands to configure the row security and then fetch the data from the database.
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Telerik Feedback Portal
and vote to affect the priority of the items