Hi All
I'm getting a rather frustrating error from Business Intelligence Development Studio (Visual Studio 2008). I have a report that contains 4 sub-reports, these sub-reports may or may not contain data, and as such their HIDDEN property is controlled by an expression:
=IIF(ReportItems![SOME TEXT BOX].Value = 0, TRUE, FALSE)
The contents of [SOME TEXT BOX] is the number of rows returned by the stored procedure for its respective sub-report, thus if the value is 0, then the rectangle containing the sub-report is set to HIDDEN = TRUE.
This works for 3 of the 4 sub-reports, but for some reason, one of them causes this error:
"The hidden expression for [RECTANGLE CONTAINING SUB-REPORT] contains an error: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed"
Some Googling reveals that this is (clearly) to do with access permissions, but most people seem to be experiencing the error in relation to MS Sharepoint, and the solutions do not seem applicable.
Any help would be most appreciated!
Brian
Edit: This only occurs when 'ReportItems![SOME TEXT BOX].Value = 0' returns TRUE, i.e. there are no rows.