Reporting Services Error Query execution failed for dataset


I’m stuck on a deployment problem for several days and cannot find the solution on the forums.

We’ve created a report (Reporting Services) and deploy it on the development environment and then test. Everything works perfectly.

We now want to deploy it on production environment, but impossible to run it!

Reporting services returned the following error:

"An error has occurred during report processing. (rsProcessingAborted)

Query execution failed for dataset ‘UserLogin’. (rsErrorExecutingCommand) Exception has been thrown by the target of an invocation.
Request for the permission of type ‘System.Security.Permissions.SecurityPermission, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089’ failed."

Here is the report method that is define as query on dataset :

[DataMethod(), AxSessionPermission(SecurityAction.Assert)]

public static System.Data.DataTable GetUserLogin()
var datatable = new System.Data.DataTable();
string lstrUserLogin;
string lstrUser;
AxaptaWrapper lclsAxWrapper;

lstrUserLogin = WindowsIdentity.GetCurrent().Name;
lclsAxWrapper = SessionManager.GetSession();
lstrUser = (string)lclsAxWrapper.CallStaticClassMethod(“SysQueryRangeUtil”, “currentUserId”);
lstrUserLogin = lstrUser;

datatable.Columns.Add(“UserLogin”, typeof(string));

return datatable;

Have someone any ideas about this problem ? Why does it work on 2 environment (DEV & TEST), and not on PROD environment ?

Thank you a lot in advance for your help.


Hi Ludovic,

From the issue, it looks it is more to do with security configuration. Please see here for more info -

Hope this helps,

Hi Harish,

Thanks for your answer, but this solution concern only reports using OLAP’s cubes. That’s not our case !