Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 Trying to add function in the CODE Tab in SSRS

Author  Topic 

fhoylman
Starting Member

3 Posts

Posted - 2009-08-03 : 11:05:48
Trying to add a custom function in Report|Report Properties and Code tab to strip HTML characters. I'm getting the following message:
There is an error on line 1 of custom code: [BC30465] 'Imports' statements must precede any declarations.
Build complete -- 1 errors, 1 warnings

This is the function:
Imports System.Text.RegularExpressions
Function GetTextFromHtml(ByVal htmlText As String) As String

Dim output As String = Regex.Replace(htmlText, "\<[^\>]+\>", "")
Return output
End Function
Any ideas would be appreciated as I'm not familiar with VB
   

- Advertisement -