ReportViewer: A great control - but beware...

One of the coolest controls in VS 2005 is the ReportViewer control. It is a powerful control for previewing, printing, and exporting (XLS or PDF) reports based on data in your database.  However, this control is something of weird animal - it is not part of the .NET framework, but is an add-on control that is part of Visual Studio.  This fact results in 2 main issues:

(1)     If you deploy your application on a computer that does not have Visual Studio  2005 installed, you cannot necessarily assume that the ReportViewer control is available on that computer – even after the .NET Framework 2.0 is installed.  This issue is easily addressed by downloading and installing the Report Viewer Redistributable (http://www.microsoft.com/downloads/details.aspx?FamilyID=8a166cac-758d-45c8-b637-dd7726e61367) onto the target computer.  Alternatively, you can build a setup program from within Visual Studio (Professional or better) to deploy your application on other computers.  Once it is detected that your application uses the ReportViewer control, it will automatically be included as part of the setup program for your application.

(2)    The  VB Express and C# Express versions of  Visual Studio do not include the ReportViewer control.  This means that if you are using VB Express or C# Express to develop an application, you must first download and install the Report Viewer Redistributable described above onto your development computer in order to compile the starter kit.  You must also must download and install the Report Viewer Redistributable onto any target machines onto which you are deploying your application.

In addition, VB Express and C# Express do not include a designer for designing reports.

Published Wednesday, February 15, 2006 2:07 AM by Jackie Goldstein

Comments

Wednesday, February 15, 2006 11:19 AM by Rajesh M

# re: ReportViewer: A great control - but beware...

Hi,

Can you recommend any good tool for reporting for ASP.NET 1.1 with VS.NET 2003. I would appreciate if you can point me to some good resources. or any guide to implement reporting with ASP.NET. It was simple to create reports using Response.write in classic ASP.
Sunday, July 9, 2006 9:16 AM by Fabio

# re: ReportViewer: A great control - but beware...

I can't find how to work with reportViewer at design time in C# Express. It won't show in design time on form canvas and neither at runtime.

I added references to Microsoft.ReportView.Winforms

and to Microsoft.ReportView.Common.

Any ideas?

thanx in advance

Fabio

Sunday, July 9, 2006 10:24 AM by Fabio

# re: ReportViewer: A great control - but beware...

thanks for answer. I already downoaded

all required software, as well as the Teacher Starter Kit, and all works well. My problem is that, even if the ReportViewer appears in the data controls, i can't get it draw on form canvas, but only just like e.g. a tableadapter.

I fixed my problem using the actual PreviewForm of Teacher SK in my project, and it displays well and, made the required code changes it works fine.

But still I can create a form like that.

BTW, the microsoft.ReportView.Design.dll is missing in redistributable ReportView Package

Thanks a lot

Fabio

Sunday, July 9, 2006 10:36 AM by Fabio

# re: ReportViewer: A great control - but beware...

...and, the same code that works in the Teacher Preview form, doesn't work in a form made by myself, with the SAME settings and the same code...weird.

Sunday, July 9, 2006 11:01 AM by Fabio

# re: GOT IT!!!

Ok, i found the problem! :)

The weird behavior is due to the fact that the auto-generate code doesn't add this code line:

   this.Controls.Add(this.ReportViewer1);

added it manually and now it works!

Thanks for help

Fabio

Tuesday, July 11, 2006 4:20 PM by Rupinder

# need help

when i print my report the following message comes u "report processing has been cancelled" and then report appears on the screen

tell me something by which i can get the message out of my reports

Tuesday, July 11, 2006 4:22 PM by Rupinder

# need help

when i print my report the following message comes  "report processing has been cancelled" and then report appears on the screen

tell me something by which i can get the message out of my reports

Monday, August 14, 2006 7:02 AM by N.

# Report Processing Cancelled

I am having the same problem. The report is however shown fine, but why is the user informed, that the report processing has been cancelled?

Monday, August 28, 2006 8:26 PM by mikeanders

# re: ReportViewer: A great control - but beware...

You are way ahead of me. I downloaded the ReportViewer redistrib and it asked if I wanted to "Repair" it. Obviously and indication that it was already there, yet nowhere in VB Express does the control seem to reside. You certainly can't drag-and-drop it on form. What am I missing here?

mikeanders@verizon.net