views:

89

answers:

0

I'm trying to create a multi-threaded service that will render a large volume of reports to multiple output sources (file, ftp, email, etc), but I've run into a large problem.

With SSRS 2000, render is a single call, allowing for each independent thread to run its own render. But with 2005 and 2008, Microsoft decided to split this into 3 separate calls. Because of this, I'm finding that my threads are stepping on each other, interleaving method calls like so:

Thread 1: Load Report
Thread 2: Load Report
Thread 1: Set Parameters
Thread 2: Set Parameters
Thread 1: Render
Thread 2: Render

This is causing a report and parameter mix-up. An easy fix would be to lock around these 3 calls, but that would effectively make the app single threaded at that point. Does anyone have any thoughts?