Web ReportViewer and Multi-value Parameter Bug (or how I spent my weekend)
This weekend, I was working on the second part of my Report Viewers article for DevX. As usual, it all started with an innocent idea which turned out into a whole-day affair. I wanted to demonstrate how to integrate the VS.NET 2005 web ReportViewer with a server report that takes a multi-value parameter. Of course, to save time to lay out the presentation layer, I decided to use absolute positioning for my web controls. Much to my surprise, the ReportViewer wouldn’t expand the multi-value parameter. It would helplessly repost the page each time I would click on a report parameter.
So, I got on an ambitious and arduous quest to find out what I am doing wrong. The most puzzling finding was that the Report Manager (which behind the scenes uses the web Report Viewer) would render the report just fine. This left me utterly perplexed and convinced that I am doing something terribly wrong. And I’ve started changing stuff around. I fixed a bunch of other issues, including some mysterious DCOM events that were logged in the Event Viewer, but the ReportViewer won’t budge.
Finally, I created a new page, dropped the ReportViewer, and configured at design time, and sure it rendered the report just fine. It turned out that there is a bug with the ReportViewer and multi-value parameters because they use absolute positioning as well. As far as I know, the only workaround for now is to change the hosting page layout to use flow positioning instead.
So, stay away from absolute positioning until this ugly bug is fixed.