Reporting Services可用于格式化XML数据类型列中返回的XML吗?

时间:2022-10-24 21:19:56

Using SQL Server 2005 and Reporting Services, I have a stored proc that returns several columns, one of which is of the XML data type. Can I manipulate/format/style that XML column in my Reporting Services report? If so, how?

使用SQL Server 2005和Reporting Services,我有一个存储过程,它返回多个列,其中一列是XML数据类型。我可以在Reporting Services报告中操作/格式化/样式化该XML列吗?如果是这样,怎么样?

2 个解决方案

#1


You can. Use the classes in System.Xml to parse the XML the way you want.

您可以。使用System.Xml中的类以您希望的方式解析XML。

On the References tab of the SSRS Report Properties dialog, add a reference to System.Xml. Then add your parsing code to the Code tab.

在“SSRS报告属性”对话框的“引用”选项卡上,添加对System.Xml的引用。然后将解析代码添加到“代码”选项卡。

There is an example here.

这里有一个例子。

#2


Haven't tried this but SRSS allows you to enter code in your report via scripting. You may be able to do something with the XML inside there, possibly with XSL

没试过,但SRSS允许您通过脚本在报告中输入代码。您可以使用XSL在其中执行某些操作

#1


You can. Use the classes in System.Xml to parse the XML the way you want.

您可以。使用System.Xml中的类以您希望的方式解析XML。

On the References tab of the SSRS Report Properties dialog, add a reference to System.Xml. Then add your parsing code to the Code tab.

在“SSRS报告属性”对话框的“引用”选项卡上,添加对System.Xml的引用。然后将解析代码添加到“代码”选项卡。

There is an example here.

这里有一个例子。

#2


Haven't tried this but SRSS allows you to enter code in your report via scripting. You may be able to do something with the XML inside there, possibly with XSL

没试过,但SRSS允许您通过脚本在报告中输入代码。您可以使用XSL在其中执行某些操作