This is a migrated thread and some comments may be shown as answers.

SQL Server Row Level Security with Telerik Reporting

1 Answer 106 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Wei
Top achievements
Rank 1
Wei asked on 11 Dec 2018, 08:07 AM

We are using the WebForms report viewer and I was wondering if there is a way to get SQL Server Row Level Security to work with Telerik Reports that have a SqlDatasource?

Is there a way to execute SP_SET_SESSION_CONTEXT before the SelectCommand is executed?

1 Answer, 1 is accepted

Sort by
0
Ivan Hristov
Telerik team
answered on 14 Dec 2018, 03:38 PM
Hello Wei,

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.

Regards,
Ivan Hristov
Progress Telerik
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? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Wei
Top achievements
Rank 1
Answers by
Ivan Hristov
Telerik team
Share this question
or