如何将 Sql Server 2008R2 生成的.rdl文件转换成Sql Server 2008版本的rdl

如果你的电脑上安装着sql server 2008R2,但ssrs的工程是由sql server 2008生成的,当你添加一个新的report的时候可能会出现错误:

Error while building reporting solution in VS 2008: Error  111         [rsInvalidReportDefinition] The report definition is not valid.  Details: The report definition has an invalid target namespace 'http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition' which cannot be upgraded.               

这是因为sql server 2008不能分辨R2产生的文件,如何将其转换成sql server 2008的文件呢,下面是解决方案:(懒得翻译了)

In this post, I’d like to share my careless experience by installing two version of BIDS in my work laptop that cause a delay for my team to deploy the report that I’d worked on. So, if you happen to have SQL2008R2 and SQL2008 installed on the same machine AND happen to modify one your RDL file, I promised that you won’t be able to open it in SQL2008 BIDS, which I thought it should because it’s still SQL2008 (silly assumption).
Anyway, to solve the issue OR to convert the RDL back to SQL2008 version, open your RDL file with any text editor and to do the following two replacements:


1. Schema
Look for:
<Report xmlns:rd=”http://schemas.microsoft.com/SQLServer/reporting/reportdesigner” xmlns=”http://schemas.microsoft.com/sqlserver/reporting/2009/01/reportdefinition“>

Replace it with:
<Report xmlns:rd=”http://schemas.microsoft.com/SQLServer/reporting/reportdesigner” xmlns=”http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition“>

 

2. Look for:
<ReportSections>
    <ReportSection>
AND its pair:
</ReportSection>
  </ReportSections>
If you found it, remove it.

Save the RDL file and ta-da…you can open it again in BIDS 2008 without losing your work.

Hope this post help you.

Cheers,
Uzzie

QUICK NOTE:
Just be careful when you copy and paste Schema section from here into your RDL because the double quotes will turn to some funny character. You need to replace it with correct double quotes.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值