Forum Discussion

Jpup7's avatar
Jpup7
Regular Visitor
6 years ago

Hidden Expression Error in Paginated Report Builder

Since the last update in March to Report Builder 15.6.1207.2 I am experiencing this issue when I try to run reports on the desktop.

 

I have a text box that indicates that no items were returned by a query and is hidden or shown based on the following expression:

 

= Iif (CountRows("Announcements") > 0, true, false)

 

When I attempt to test my report on the desktop the following error occurs. However when I run the report in the web the error does not occur, 

 

Here is the error message:

 

The Hidden expression for the text box 'Textbox1' contains an error: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
----------------------------
The Hidden expression for the text box 'Textbox1' contains an error: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
----------------------------
An error occurred during local report processing.

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Jpup7 v-diye-msft   

    I have the same issue . but mine has to do with the hidden expression for a rectangle in Power Bi paginated report.

    this is the expression =CountRows("LatestExtension") = 0

     

    The Hidden expression for the rectangle 'Rectangle4' contains an error: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
    ----------------------------
    The Hidden expression for the rectangle 'Rectangle4' contains an error: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
    ----------------------------
    An error occurred during local report processing.

     

    any possible resolution will be appreciated. Thanks

     

  • akorn's avatar
    akorn
    Icon for Microsoft Employee rankMicrosoft Employee

    This is related to .Net configuration

     

    Can be as follows resolved, see screenshot:

    1. Navigate to C:\Program Files\Power BI Report Builder\RSPreviewPolicy.config

    2. Create a back up of the file copying it to another location

    3. Open the file with Notepad and add the following script after line </PermissionSet>

                            <PermissionSet

                                    class="NamedPermissionSet"

                                    version="1"

                                    Name="ExecutionAndInfrastructure">

                                <IPermission

                                        class="SecurityPermission"

                                      version="1"

                                      Flags="Execution,Infrastructure"

                               />

                   </PermissionSet>

    4. In the section with UnionCodeGroup replace “Execution” with “ExecutionAndInfrastructure”

    5. Save and reopen Power BI Report Builder

     

    Official documentation: SecurityPermissionFlag Enum (System.Security.Permissions) | Microsoft Docs