Friday, December 2, 2011

RDL won't open in Design View in BIDS 2008? No problem.

You may find yourself working on an SSRS report in BIDS 2008. You may ask yourself, "Why can't I re-open this report in Design View?  Why is it this ugly line of non-formatted HTML?"

You may also find yourself behind the wheel of a large automobile, or living in a beautiful house, with a beautiful wife. But that's neither here nor there...

I have had this problem multiple times, and every time I have to look up the answer on the MS SQL Server forums.  But today, they were down for maintenance, so I was up the creek.  Therefore, I decided that once I refound the answer, I'd blog it, and provide links and a summary explanation. 

This puts it in a nutshell, and is where I eventually find the answer (usually).  So credit where credit's due:  http://blog.hoegaerden.be/2009/03/28/the-datatype-attribute-is-not-declared/

And here's a brief explanation:

There is a (known) issue within BIDS 2008 where it will serialize a Report Parameter's XML incorrectly.   If your report has an Available or Default value, BIDS will add an attribute called "DataType" in to one or more of your parameter's Value tags.  This effectively invalidates the entire RDL, because the Value tag doesn't actually have that attribute.  You try to open an RDL in Design View that's been saved this way, and the deserializer can't do it.  Ka-boom.  You receive a long horizontal scroll of unformatted HTML.  Yay.

The solution is:
Simply delete those attributes where they are found. 
Do a Find on "<Value DataType=" in the HTML and delete the attribute (and its value) wherever it turns up.

Hope this is helpful.  Now that I've written this out, I will expect myself to remember it....


No comments:

Post a Comment