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>
New configuration:
<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>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s