English 中文(简体)
将 HTML 格式的 SQL 数据转换为 SSS 中的标准文本
原标题:Convert SQL data in HTML format to standard text in SSRS

我有一个 MVC2 C#. Net Web 应用程序, 以 html 格式存储某些描述字段的数据。 使用 SSRS 显示数据时, 数据会用 excaped html 字符... ie 显示 。

<p>"YOU KNOW WHAT IT MEANS TO ASSUME"</p>  

所以报告里看起来怪怪的。我可以在文本上做Nested REPLACEs 来创造正确的输出:

"YOU KNOW WHAT IT MEANS TO ASSUME"

但似乎应该用真菌SQL 来做这件事。

有什么想法吗?

最佳回答

你谷歌的"htmlsssr"吗?

我找到了这个页面:"http://sqlblog.com/blogs/greg_low/archive/2008/08/25/displaying-html-content-in- report-services-2008.aspx" rel=“nofollow”>在2008年的报告服务中扮演HTML内容

以下是步骤:

  1. 在要显示列的表格中, 右键单击单元格, 并选择“ 创建占位符”...

  2. 在常规标签(新占位符属性的)上,将值设定为要求的列。

  3. 在标记类型中,选择 HTML - 将 HTML 标记作为样式解释

问题回答

正则表达式 :

= System.Text.RegularExpressions.Regex.Replace(StringWithHTMLtoStrip, "<[^>]+>","")

来源

另一个好例子这里





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签