I am working on an application facing a security permission issue while wanting to preview a report using view report. Below are the expressions I am using in grpAccountCat are given below.
Filter Expression
=IIF((SUM(Fields!NatlAmount.Value) = 0) AND (SUM(Fields!NatlYTD.Value) = 0) AND (Parameters!ExcludeZeroBalance.Value = True), False, True)
Variables
=Code.SetTot(Fields!accountcat.Value, SUM(Fields!Amount.Value))
Below is the function I have defined in the Code tag on "rdl" XML
<Code>
Function SetTot(Type As String, Value as Decimal) As Decimal
Dim ret as Decimal = 0
Select Case Type.ToLower()
Case "eq"
EQTot = Value
Case "ex"
EXTot = Value
Case "cs"
CSTot = Value
Case "ot"
OTTot = Value
Case "rv"
RVTot = Value
End Select
ret = Value
return ret
End Function
</Code>
The error is shown in the below image while trying to view the report.
