Report services with VS2008... and custom assemblies

by Bjørn Storkholm 22. July 2009 21:00

The other day, I had to convert some old reports from Report Server 2005 to be able to compile in Visual Studio 2008.

The first challenge about this was, that all the developers at the clients place runs VS 2008, but the SQL Server is 2005 - hence the developers only runs SQL 2005 on their dev machines. This results in VS not being able to recognize the report projects.

Solution for the first problem is, to install Business Intelligence Studio 2008 from the SQL Server 2008 installation. I ran the full installer, but only selected BI to be installed, and it does not seem to interfer with the actual SQL 2005 instance, that is running on the dev machine.

Second problem is, that these reports is using a custom assembly. The reports all referenced the custom assembly, but building the project failed - claiming it couldn't find the assembly. It appears, that the assembly has to be copied to a directory under Visual Studio, since reports sucks. The directory in my case was C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies. But the final solution to this would be, to add a post build event to the project copying the assembly to the correct directory: copy "$(TargetPath)" "$(DevEnvDir)PrivateAssemblies"

 So now it builds... everybody is happy... hehe ... heard that before :)

The reports still fails runtime on the server. The custom assembly needs to be deployed, in this case in the folder C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer\bin.

Note that the mentioned folders is pretty much different from versions of Visual Studio and SQL Server. The mentioned folders are pretty much standard for Visual Studio 2008, but is very much taken from my own installation, and may vary from setup to setup.

 

Update 20091125: Whatever team in MS who does the reporting services fucked up again. Even though you can compile the reports under 2008 and have them running on the production server, they will not work if you modify them in VS 2008 and try to deploy it on an SQL Server 2005. They changed the schema again, so it seems there's no way you can edit reports in VS 2008 and run it on SQL 2005 - you need to have VS 2005 installed.

Add comment



biuquote
Loading



Powered by McDonalds

About Bjørn

Bjørn StorkholmBjørn Storkholm has been working in the IT industry since the mid 90es, with a primary focus on Microsoft technologies. Started developing on the dotNet platform in 2001, when it was in it's early beta stages.

About the blog

This is a place where I can discover my own findings, after they have slipped my memory. But maybe others can find some usefull stuff here as well.

The blog is powered by BlogEngine