views:

522

answers:

2

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.

A: 

So I've found a half solution: I went to the report manager URL and then to site setting, then security, and added a New Role Assignment with full access for all members of our domain. as per:

http://msdn.microsoft.com/en-us/library/aa337385.aspx

This has allowed the report to work in the deployed web application, but BIDS is still unable to run the report. Hey ho, at least the customer can use it, and I can test it via the Report Manager.

Brian
A: 

Ok, so I've found the real cause of this problem; Microsoft, and their unhelpful error messages! But seriously I was getting this error because I was passing a NULL value.

Assuming you've read my initial question, the dataset that was getting the NULL was the one that populates [SOME TEXT BOX], but the NULL was not in the field that populates [SOME TEXT BOX]. A bit round the houses but I've got there in the end!

Brian

related questions