简体   繁体   English

Visual Studio 2010 RDLC:支持HTML?

[英]Visual Studio 2010 RDLC: Support for HTML?

I've read rumors that with the Report Viewer component of Visual Studio 2010 Professional, it is possible to render HTML from the database into a report. 我读过有关Visual Studio 2010 Professional的Report Viewer组件的谣言,可以将数据库中的HTML呈现为报告。 Unfortunately, I wasn't able to find definite information online and I'd rather not buy the upgrade just to try it out. 不幸的是,我无法在网上找到明确的信息,我宁愿不购买升级只是为了尝试一下。

Can anyone confirm or deny that this feature exists, preferably by citing a credible source (such as the VS 2010 documentation)? 任何人都可以确认或否认此功能存在,最好是引用可靠的来源(例如VS 2010文档)?

(EDIT) Clarification : I'm talking about Visual Studio, not SQL Server. (编辑) 澄清 :我说的是Visual Studio,而不是SQL Server。 I know that SSRS 2008 and SSRS 2010 support rendering HTML. 我知道SSRS 2008和SSRS 2010支持呈现HTML。 I also know that Visual Studio and SQL Server use the same libraries for rendering reports. 我也知道Visual Studio和SQL Server使用相同的库来呈现报告。 That's why I think that it might be possible to render HTML in Visual Studio 2010 client-side ("local processing") RDLC reports. 这就是为什么我认为可以在Visual Studio 2010客户端(“本地处理”)RDLC报告中呈现HTML的原因。 I just want someone to confirm this: Can I render HTML using the ReportViewer component of Visual Studio 2010? 我只是希望有人确认这一点: 我可以使用Visual Studio 2010的ReportViewer组件呈现HTML吗?

You can render subsets of HTML in a VS2010 Report Viewer by editing the Place Holder properties under "General" on the L/H side of the properties window. 您可以通过编辑属性窗口L / H侧“常规”下的“占位符”属性,在VS2010报表查看器中呈现HTML子集。 This will work in .RDLC or .RDL file. 这将在.RDLC或.RDL文件中使用。

According to your comment above: 根据你上面的评论:

@Alison: The problem is quite simple: If I display a field containing HTML in a report, this field shows the HTML source instead of the rendered content. @Alison:问题非常简单:如果我在报表中显示包含HTML的字段,则此字段显示HTML源而不是呈现的内容。 Your statement that rdlc s in VS2008 Professional support HTML rendering surprises me. 您在VS2008 Professional中支持HTML渲染的rdlc声明让我感到惊讶。 As far as I know, this is not the case (see, for example, stackoverflow.com/questions/2172105). 据我所知,情况并非如此(例如,请参阅stackoverflow.com/questions/2172105)。 Can you give more information on how you think it is possible to display rendered HTML in a VS2008 report (note that I am talking about rdlc reports, not Crystal reports)? 您能否提供更多信息,告诉您如何在VS2008报告中显示呈现的HTML(请注意,我说的是rdlc报告,而不是Crystal报告)?

Create a placeholder, or select one that may already be in a grid for example. 例如,创建占位符,或选择可能已存在于网格中的占位符。 Right Click and select Placeholder Properties. 右键单击并选择“占位符属性”。 General should be selected by default, look under Markup Type, select the "HTML - Interpret HTML tags as styles" radio button. 默认情况下应选择常规,在标记类型下查看,选择“HTML - 将HTML标记解释为样式”单选按钮。 This will cause the control to render a subset of HTML. 这将导致控件呈现HTML的子集。

Clarification: This works for .RDLC files created with VS2010 and its Report Viewer. 澄清:这适用于使用VS2010及其报告查看器创建的.RDLC文件。

http://msdn.microsoft.com/en-us/library/cc645967.aspx http://msdn.microsoft.com/en-us/library/cc645967.aspx

Yes, you can Render html in Visual Studio 2010 Professional. 是的,您可以在Visual Studio 2010 Professional中渲染html。 Only you need to do is double click on text field that you want to render, It will open Placeholder Properties window, By default General tab will be selected on the left top corner, if it is not selected , Please select General tab, there you will see radio button option:Html-Interpret HTML tags as style, Please select that option and click ok, that should work. 只需要双击要渲染的文本字段,它将打开占位符属性窗口,默认情况下,左上角将选中常规选项卡,如果未选中,请选择常规选项卡,那里有你将看到单选按钮选项:Html-Interpret HTML标签作为样式,请选择该选项并单击确定,这应该有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM