We're moving from our legacy reporting app to SQL Server Reporting Services 2008 and I'm converting our reports slowly but surely.
In our organization, one of our departments sends out letters that have standard marketing messages and disclaimers that they put into .rtf files. Currently, our reporting application has an RTF box control that can do that fairly easily. I've
not found a similar control in SSRS 2008.
My thought, then, was to use a piece of embedded code in the report to grab the necessary text from the file and reference it in the Value of a Placeholder (using a Code.<FunctionName>.ToString() statement) - using HTML tags for the necessary formatting
for those files.
I don't care if I have to convert the existing RTF files to HTML files to do this, that's not an issue.
The code I'd come up with is this:
Public Function GetTextFile(ByVal strFileName as String) As String
Dim oFile as System.IO.File
Dim oRead as System.IO.StreamReader
oRead = oFile.OpenText(strFileName)
GetTextFile = oRead.ReadToEnd()
And the Expression I was using to get the text from the file is:
Where "HTMLTest.txt" is the file name that I'm using. The text itself is just a line of text with some HTML tags included for formatting - bold, color,
View Complete Post