Tuesday, April 12, 2011

With SQL Server 2008 R2, using the LocalReport class throws The report definition is not valid. The Report definition has an invalid target namespace"

I needed SQL Server 2008 R2 to get a a few features. One of them was having the ability to define tabs for Excel rendering in reports. Another was the shared dataset features and shared report features.

Anyways, I wanted to try using LocalReport to render an Excel workbook from a report without actually needing SSRS installed and the report deployed and all that. It's a solution a lot of developers seem to use.

Here's the issue.

The ReportViewer control was not updated to handle rdl or rdlc files made with Report Builder 3.0. I don't user Report Builder (I use BIDS) but as far as I can tell, if you've set bids Target Deployment Server to R2 (which I have), you create rdl files that match the new schema.

That's what ReportViewer is complaining about. There seems to be no fix planned. It's a "wait for Denali" thing, as frustrating as that is.

So my workaround was to go ahead and deploy and configure to a real SSRS server, instantiate a ReportViewer control on my own in code set to Remote Processing and go get the form. It's working so far.

I know that's not a good workaround for everyone. I'm not sure how the licensing works, but I suppose it might be okay to use the cheaper SQL Developer Edition and ship RDL files you make with the free ReportViewer controls.

No comments:

Post a Comment