如果你的电脑上安装着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.