Search code examples
subscriptionssrs-2017

Report column is showing #Error when using Subscriptions


As titled, when using SSRS 2017 subscriptions to generate a report, a column with expression is showing #Error. However, when I try to run manual in web and in the report builder, it can be shown.

The Expression is: =Code.Decode(Fields!Comments.Value)

The function is:

Function Decode(ByVal EncodedString AS String) AS String

    Return System.Web.HttpUtility.HTMLDecode(EncodedString)

End Function

Any suggestion or help will be welcome.


Solution

  • I resolve the problem by myself. Use the following method instead

    Function Decode(ByVal EncodedString AS String) AS String
       Return System.Net.WebUtility.HtmlDecode(EncodedString)
    End Function