【发布时间】:2023-03-26 03:45:01
【问题描述】:
我正在尝试在 SQL SERVER Reporting Services (SSRS) 中显示 rtf 数据。 我有 Visual Studio 2010 和 ReportViewer 版本 10.0.0
rtf 数据存储在我绑定到 SSRS 报告的数据集中。
我添加了以下对报告参考的参考 System.Windows.Forms 在 SSRS-Report 中的文本框表达式中,
=Code.ConvertRtfToText(Fields!colInfo.Value)
以下代码我已放入报告代码属性中
Public Shared Function ConvertRtfToText(ByVal input As String) As String
Dim returnValue As String = String.Empty
Dim converter As New System.Windows.Forms.RichTextBox()
converter.Rtf = input.Trim
returnValue = converter.Text
Return returnValue
End Function
我得到的输出是
{\rtf1\ansi\ansicpg1252\uc1 aaa}
【问题讨论】:
-
是的。但是,我找不到配置文件。此外,我想知道它与 SQL Server 配置本身有什么关系。我正在使用 SQL CE。但是,这与要在报告中显示的文档文本有关!
-
你能否分享上述问题的答案,面临同样的问题
标签: c# reporting-services ssrs-2008 rtf