When using DevExpress web reporting framework (in asp.net mvc5), I encounter a design issue related to the custom ReportStorageWebExtension.
Currently I found that the example and all the references online is using it as a global singleton instance. However, in my scenario, I'd like to make some of the ReportStorageWebExtension's behavior context dependent.
To be more detailed, here is an example:
When web report designer displays and before I would open report or (show available subreports from dropdown), it will invoke the GetUrls method of storage extension class to get all reports. But here my report web app will be used by various end-users and they will have different set of reports available (due to different privileges or might even use separate database tables to store reports). When the mvc page which contains the reportdesigner is visited, I will have some context information like userId (which I can determine context), but how can I let the web report storage extension also get awared of that?
Is there any built-in extension points for such scenario or if not, can you help me find any possible workarounds?
To accomplish this task, you can access your HTTP context in the ReportStorageWebExtension class' methods as demonstrated in the Access HttpContext.Session in Services help topic. This will help you get the current user's data in the storage's methods and return the list of reports available for the current user only.
Let us know if you have any further questions regarding this.