The Haphazard Blog

Tag: report viewer

Microsoft .Net Report Viewer with Visual Studio Express Editions

by on Sep.03, 2009, under Software Development, Technology

I recently was given some code written in C# and was unable to get the solution to build. I was getting the following error using Visual C# 2008 Express SP1:

The type or namespace name ‘Reporting’ does not exist in the namespace ‘Microsoft’ (are you missing an assembly reference?)

I tried a lot of things recommended by MSFT experts on the MSDN forums to no avail. I installed the Microsoft Report Viewer 2008 SP1 Redistributable. Still couldn’t build. I couldn’t locate the library through the toolbox either. Later I found that the necessary DLLs never were installed. I tried other report viewer redistributables. I even tried getting the files from another developer and placing them in the correct location. I still could not add them through the toolbox. Some people said that I need to install Visual Web Developer. I had it installed so that did not matter. Everything I tried would not allow me to use the Microsoft.Reporting.WebForms or Microsoft.Reporting.WinForms libraries.

This is the solution I found to work and it makes sense. You need to install the SQL Server Express 2008 Runtime with Advanced Services. If you just installed any of the Visual Studio Express editions, then it automatically installed SQL Server Express 2008 Compact Edition. That is missing the reporting services and you had no option to install anything. You can install the whole thing from Microsoft’s SQL Server Express download site. Note that this will install another instance of SQL Server Express in addition to Compact (if you have it installed). It won’t upgrade it.

I found the cleanest way to do it is to install SQL Server Express 2008 Runtime with Advanced Services first and then install the VS Express editions. They will recognize that SQL Server is installed and skip SQL Server Express Compact Edition.

10 Comments :, , , more...