将 RDL 报告转换为 RDLC 以在 MVC 中使用
我有一个现有的 RDL 报告,我想将其转换为 RDLC 报告以在 MVC 应用程序中使用。
按照MSDN Site的方式进行转换就是将.rdl文件重命名为.rdlc,将其包含在项目中,然后使用ReportViewer控件选择数据源。
作为 MVC,我的页面上没有 ReportViewer 控件,我使用 这篇文章 帮助我将报告呈现到响应流中。
我已将 rdl 重命名为 rdlc 并将其包含在我的项目中,但在尝试打开它时出现以下错误:
报告定义无效。 详细信息:报告定义有一个 无效的目标命名空间 'http://schemas.microsoft.com/sqlserver/reporting/2008/01 /报告定义' 无法升级。
有什么想法可以将 rdl 转换为 rdlc 而无需重新编写它吗?
I have an existing RDL report that I want to convert to an RDLC report for use in an MVC application.
According the the MSDN Site the way to convert it is to rename the .rdl file to .rdlc, include it in the project and then use a ReportViewer control to select the datasource.
Being MVC I don't have a ReportViewer control on my page, I was using this post to help me render the report into the Response stream.
I've renamed the rdl to rdlc and included it in my project but I get the following error when trying to open it:
The report definition is not valid.
Details: The report definition has an
invalid target namespace
'http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition'
which cannot be upgraded.
Any ideas how I can convert the rdl to rdlc without having to re-write it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您无法将 SQL Server 2008 Reporting Services 报表 .RDL 转换为 .RDLC - Microsoft 只知道原因......
请参阅 Bill Vaughn 的 撤回:ReportViewer 控件不支持 SQL Server 2008 RDL在本地模式中获取一些专家见解。
简而言之:目前,Microsoft 还没有在 Reporting Services 2008 中将 RDL 转换为 RDLC 的工作方案。
You cannot convert a SQL Server 2008 Reporting Services report .RDL into .RDLC - Microsoft only knows why.....
See Bill Vaughn's Retraction: The ReportViewer Control does NOT support SQL Server 2008 RDL in Local Mode for some expert insight.
In short: right now, Microsoft doesn't have a working story for converting RDL to RDLC in Reporting Services 2008.
要更正之前的答案:您无法在本地模式下使用 VS 2005 或 VS 2008 ReportViewer 控件渲染 SSRS 2008 RDL 文件,因为 SSRS 2008 中的架构已更改,但未启动该控件达到标准杆。 VS 2010 附带了一个 ReportViewer 控件,该控件显然支持 SSRS 2008 架构。
如果支持架构,则无需进行转换(除了将文件从 RDL 重命名为 RDLC,这就是它在 VS 2005 环境中的工作方式)。
请参阅我在 MSDN 上的问题< /a> 关于这个问题。
To correct the earlier answer: you cannot render an SSRS 2008 RDL file with the VS 2005 or VS 2008 ReportViewer control in local mode, because the schema has changed in SSRS 2008, but the control was not brought up to par. VS 2010 comes with a ReportViewer control that apparently supports the SSRS 2008 schema.
If the schema were supported, no conversion would be necessary (other than renaming the file from RDL to RDLC, which is how it worked in a VS 2005 environment).
See my question on MSDN about this issue.
实际上,您可以将 .RDL 转换为 .RDLC。将报告复制到项目上的报告文件夹中,将扩展名从 .RDL 重命名为 RDLC。只需确保您有 Microsoft.ReportViewer.Webforms 参考。我使用报告生成器创建了大量报告,在那里构建和测试它们,然后将它们复制到我的项目(MVC)中。只是我的2分钱。
Actually, you can convert an .RDL to .RDLC. Copy the report to your report folder on your project, rename the extension from .RDL to RDLC. Just make sure you have the Microsoft.ReportViewer.Webforms reference. I have created a ton of reports, using the Report builder, built and tested them there, then copied them to my project (MVC). Just my 2 cents.