Forum Discussion
Visual Studio SSDT System.Security.Permissions.SecurityPermission
Hi,
I have VS 2019 and SSDT installed local on my computer. I have an expression in the textbox, using "Floor", "Abs". When I try to preview the report on my computer, it gives "#Error"
In the Visual Studio, window: error list, it shows as
[rsRuntimeErrorInExpression] The Value expression for the textrun 'Textbox133.Paragraphs[0].TextRuns[1]' contains an error: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Note: When I publish this to PBIRS, report works fine. only shows error on my computer's visual studio / ssdt. Also, works on Report Builder when I open ...
Any idea? Thanks
8 Replies
- sevenhillsSuper User
I submitted the same here also , but seeking help here also
- bradsyMicrosoft Employee
There is typically a setting to allow certain types of permission for the app domain the expression is running in. This might help: https://stackoverflow.com/questions/32428/how-do-i-resolve-a-system-security-securityexception-with-custom-code-in-ssrs
- sevenhillsSuper User
Hi Bradsy,
I read the link before posting and I dont have any custom extensions. Inside the report, using ABS, Floor in an expression, in a textbox.
I am having error only my laptop (and not on the server). Even on my laptop, if use the reportbuilder, it wont give any exception i.e., it works fine. On the PBIRS server, it works fine.
Version info: Microsoft Visual Studio Professional 2019 Version 16.7.3 SQL Server Data Tools 16.0.62008.03130 SQL Server Reporting Services 15.0.19124.0 Microsoft SQL Server Reporting Services Designers Version 15.0.19124.0
I am localadmin in case this matters.
Also, on a side topic, if it is asp.net site, we can add references, this is Visual Studio, Reporting Services (SSDT) project ...
Thanks
- bradsyMicrosoft Employee
Can you post an example of the expression I can run on local data to see if this is systemic or just your instance?
- sevenhillsSuper User
Today, I encountered one more error
Works: COUNTROWS("DataSet1_WithTextOrNumber")
Works: COUNTROWS("DataSet1_WithOnlyOneDateColumn")
Works: COUNTROWS("DataSet1")
Works: Parameters!FirstDate.Count
Works: JOIN(Parameters!FirstDate.Value," & ")
NOT Works:
a. Select SQL_Col_Date from table1 (Only one date column)
b. Add one more calculated field in report dataset as =Format(Fields!SQL_Col_Date.Value,"Short date")
c. using COUNTROWS("DataSet1_WithOnlyOneDateColumn_CalcColumn") inside an expression ... gives error!
= IIF(COUNTROWS("DataSet1").Equals(Parameters!FirstDate.Count)
,"All",JOIN(Parameters!FirstDate.Value," & "))[SQL Server as datasource]. Hope microsoft will look into it!
Thanks