Thursday, July 19, 2012

Report Builder 3.0 and SSRS 2008

So I went looking for a tool to help me build out reports. I found Report Builder 3.0http://www.microsoft.com/en-us/download/details.aspx?id=6116.


This is very helpful to build out and test your reports. Everything is a happy time, until you go to upload your report. If you are running Version 2008 of SSRS you get this nice message.

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. (rsInvalidReportDefinition)


WTF does that mean? Well the short answer is that the report builder uses the 2010 schema, and our server is a 2008. Upgrading the server is not an option, so I have to find another solution. First thing I do is look at the RDL in question in notepad++ and compare it to a valid RDL that I pull from the server. They are vastly different, I mean night and day different. There is no way that these two RDL's are the same. So I download the RDL I want to modify again, and check it in notepad++. Looks good. Open in report builder, save, open in notepad++. WTF?!?! The changes are back!


I start to examine the files and notices that they are different, but the same. For the most part, things have just been rearranged. Hence the night and day differences. Then at the very top the schema definition is 2010 and the old has 2008.


That is when I dig in, knowing there has to be a way to fix this by hand. Sure enough there is.


Replace the 2010 header with;

<Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" 
xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition">

Then do a find for the following tags; 
<ReportSections> <ReportSection> </ReportSections> </ReportSection>


Now remove just the tags! Keep the body in the report. Now upload. Seriously, that is it. The report now works, no need to have VS 2008 installed to do your report building, and no need to upgrade the server just to use the tool.


Seriously, WTF?!