SSRS Report Error – AX_CompanyName
When running a report in DAX2012 you might get the following message:
The DefaultValue expression for the report parameter ‘AX_CompanyName’ contains an error: Request for the permission of type ‘System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089′ failed. (rsRuntimeErrorInExpression)
The error seems to occur mostly with Reporting Services that have been configured to use a Microsoft Dynamics AX configuration file, Microsoft.Dynamics.AX.ReportConfiguration.axc.
The solution to this problem is to change the permission set name on the Report_Expressions_Default_Permissions in the rssrvpolicy.config file within the SSRS reportserver directory.
Standard configuration:
<CodeGroup class=”UnionCodeGroup” version=”1″ PermissionSetName=”Execution” Name=”Report_Expressions_Default_Permissions” Description=”This code group grants default permissions for code in report expressions and Code element. “>[…]</CodeGroup>
<CodeGroup class=”UnionCodeGroup” version=”1″ PermissionSetName=”FullTrust”
Name=”Report_Expressions_Default_Permissions” Description=”This code group grants default permissions for code in report expressions and Code element. “>
[..]
</CodeGroup>
This was originally posted here.

Like
Report
*This post is locked for comments