问题
When I create a new Reporting Services report or try to open an existing report (that has been working) in Visual Studio 2008. I cannot view the design. I get no error message and it only shows html code in the "Design View". I've tried reinstalling VS2008 and BIDS, but hasn't worked. This was all working when I last used it 2 weeks ago.
-nate
回答1:
I had the same problem, and Kyle's was the exact answer. In my case, the Error List window (In Visual Studio 2008 IDE: View > Error List) displayed three errors, all the same:
"The 'DataType' attribute is not declared."
The three lines looked like this:
1291: <Value DataType="Integer">3</Value>
...
1295: <Value DataType="Integer">2</Value>
...
1299: <Value DataType="Integer">1</Value>
On removing the DataType="Integer" from each line, as below, the report displayed correctly:
1291: <Value>3</Value>
...
1295: <Value>2</Value>
...
1299: <Value>1</Value>
My assumption/guess is that the report was modified from the Report Manager web page (http://localhost/reports/)
回答2:
Nate, I know this is an old post, however, I was having this same issue and resolved it by switching the rdl file to code view and finding that visual studio added an invalid attribute to one of the parameters tags (it was underlined with a blue squigely). When I deleted the parameter, everything worked properly.
回答3:
Same thing happened to me today. When I opened a report that I had used only minutes ago, it was showing HTML in the design view. I clicked on the Error List tab at the bottom and it said "Deserialization failed: The 'DataType' attribute is not declared. Line x, position x." I switched to code view and found the invalid attribute, underlined with a blue squiggly line. I removed the offending attributes and everything was back to normal.
来源:https://stackoverflow.com/questions/1759798/visual-studio-2008-report-server-project-design-view-not-working