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.

How to format dates in SQL scripts

by Bjørn Storkholm 19. July 2009 10:48

Erik Ejlskov posted this great tip on how to format dates in sql scripts to avoid localization issues. {ts '2009-05-11 23:00:00'}

MSCRM outlook client and colored categories

by Bjørn Storkholm 17. July 2009 17:10

I’ve been messing a bit today, with installing the Outlook Client for Microsoft CRM. I had a few issues regarding my own infrastructure, but got that solved in a short time.

But when I got it up and running there was one thing that was really annoying, that Google couldn’t give me an answer to. When I synchronized with the server, all appointments and other items that were categorized as [CRM] regarding: <some account>.

Seems fair enough, but I’d like my appointments from CRM to have another color, so I can easily see which appointments should be invoiced, and which is private. But this did not seem to be possible. Trying to do this, the CRM category is not editable at all.

As mentioned Google gave no answers, and some MVP at a Microsoft forum claimed, that it is not possible to edit the color of the CRM category. What a bummer.

But hey…. The answer is quite simple. In Outlook go to folder view, right click Mailbox select Properties for… click the button Upgrade to Color Categories…

This will create new categories for all the items that you’ve already related to CRM. And these categories are editable. If in the future, you add some new appointments related to a customer, that doesn’t have a category yet, just find the Upgrade to Color Categories…  button again.

Silverlight 3 released

by Bjørn Storkholm 10. July 2009 12:46

Yesterday Microsoft released Silverlight v3. Trying to install the new version I had a few sad findings. First of all, Silverlight v3 is not supported on Windows 7 with IE 8. I sure couldn't install it, and figured it might be because Win7 is still in Beta or the fact, that I'm running the 64 bit version of the OS. But check their system requirements:

While trying to figure out what was going on, I tried to see what would happen if I ran the 64 bit version of IE8, and discovered that silverlight does not support the 64 bit version at all. But ok... Adobe flash doesn't support the 64 bit version either.

I think, that it's weird.

LinQ and PocketOutlook

by Bjørn Storkholm 2. July 2009 13:22

I started writing a small application, which can handle objects in Pocket Outlook Object Model (POOM) items, aka Appointments, Contacts etc.

Writing a simple LinQ query to select my appointments, with a specific subject:

IEnumerable<Appointment> filteredAppointments = from appointment in appointments

                    where appointment.Subject == "Cornelius 2001"

                    select appointment;

 

 I was astonished to find, that this gives a compilation error, with a description saying “Could not find an implementation of the query pattern for source type”. Since I previously did a lot of work with POOM, I’m not that surprised with the fact, that there are always surprises.

Search Google for 5 minutes gave the solution. Explicitly specify the type of the object you want to select:

IEnumerable<Appointment> filteredAppointments = from Appointment appointment in appointments

                    where appointment.Subject == "Cornelius 2001"

                    select appointment;

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