Posts Tagged ‘ReportViewer’

ReportViewer Website Data Sources Pane Suddenly Shows As Empty

March 22, 2009

It Was There A Moment Ago

I was happily using the excellent and free ReportViewer add-on Control when suddenly I noticed that the Website Data Sources Panel was blank. This is a Category Orange catastrophe for ReportViewer as it means that you can no longer easily add data items to the report without hacking the rdlc file.

Risking Anaphylactic Shock
I responded to this issue with my normal professional saviour-faire, entering an insane frenzy of clicking every available menu option interspersed with hyperactive Googling and masking my sweaty fear by eating handfuls of peanuts.

Just as I was about to sacrifice my emergency sacred ferret to a graven image of Bill Gates I fluked a gigantic ‘WHAT-THE’ on one of my semi-random Menu options. When selecting Report->DataSources from the Visual Studio 2005 main menu (NB you must be currently editing the rdlc file for this menu item to be visible) I got this error message:

“Cannot compile ajaxtoolkit.dll”.

Now, our Web Project has a reference to ajaxtoolkit.dll in the Bin folder which always throws a Compilation Warning. Could ReportViewer be touchy about this ? So I excluded the offending dll from the Project, recompiled the project et voila,…nothing happened…ONLY KIDDING!!.. WebSite DataSources came flowing in as contentedly as obese Policmen to a Krispy Kreme franchise.

Replicating The Problem
1. Have a bad Reference in your Bin folder e.g. put in the wrong path to a dll
2. Edit any DataSet that currently shows in your WebSite Data Sources Window in Visual Studio XML editor (e.g add a new column to a DataTable)
3. Recompile your app.
4. WebSite Data Sources Window goes blank.

Fixing The Problem
1. Exclude the bad Reference from your project
2. Recompile
3. WebSite DataSources return
4. Return emergency ferret to cage.

Others On The Journey Of Pain
Fellow desperado gtrfinder also had to kill bad dlls to make his Website Data Sources Window populate. Others in that ASP.NET Forums thread report various workarounds. Good Luck!

What Is This Thing Called ReportViewer ?
Its like a baby brother to SQL Server Reporting Services Reports, but you don’t need SQL Server. The only dependency is the .NET 2.0 (or better) Framework. Nice for a free Reporting Solution for .NET. I got onto it while hunting for a way to easily do Drill-Down Reports in .NET. It ships with Visual Studio 2005 and 2008. Here’s the MSDN write-up with some getting started tutorials.