Last post Dec 15, 2011 04:15 PM by N_EvilScott
Dec 14, 2011 03:21 PM|ahbenshaut|LINK
I have created a report using the asp 2.0 reportviewer. How does one go about printing a report in local mode? I did some googling and one of the "solutions" was to create an image and print that. seems a bit hokey.
Is there a "best practices" method of implementing local report printing?
any help is greatly appreciated
Dec 14, 2011 06:42 PM|N_EvilScott|LINK
Well yes, you just use the ReportViewer 2008 or 2010 depending on which schema you used to write the report in, and then print that way. However a lot of people also find it better practice to render the report into a PDF or other exportable file and let
something like adobe reader print it on the client. It's really just preference.
Dec 15, 2011 11:56 AM|ahbenshaut|LINK
Ah...well, I'm using Visual Studio 2005. If i used a newer version of the Report Viewer, would that cause any issues with my current version of Visual Studio?
Dec 15, 2011 01:58 PM|N_EvilScott|LINK
According to the link below:
"When you open your existing RDL 2005 reports in Report Designer, you must elect to upgrade your report to the RDL 2008 schema. The Visual Studio 2010 Report Designer in does not support the RDL 2005 schema. However, you can still process your existing RDL
2005 reports in the Visual Studio 2010 ReportViewer controls, which support reports based on the RDL 2005 and RDL 2008 schemas in local processing mode."
So in short, no it will not cause any problems. Feel free to upgrade! :)
Dec 15, 2011 02:02 PM|ahbenshaut|LINK
Ok, 1 more question..for now. Does the reportviewer need to be installed on the server and the workstation or just the server since its the one doing the work?
Dec 15, 2011 02:16 PM|N_EvilScott|LINK
It only needs to be installed on the server, however if the user wishes to PRINT directly from the reportviewer then it will ask to install the tools necessary for it, which will come from the server automatically. Also please note that unless its changed
since the last time I checked, the ReportViewer 2010 only allows printing via IE. Chrome and FireFox do not support it, so the Print button won't even show up.
Dec 15, 2011 02:35 PM|hajiposter1|LINK
Dec 15, 2011 02:50 PM|ahbenshaut|LINK
That's where I started but the print icon is still unavailable
Dec 15, 2011 02:58 PM|N_EvilScott|LINK
Dec 15, 2011 03:17 PM|ahbenshaut|LINK
ugh..stooipd question here...
I downloaded the 2010 Report viewer redistributable and installed it. However, when I try to add the control to my VS2005 toolbox, I can't find it by way of the "Choose items" dialog box...
Dec 15, 2011 03:21 PM|N_EvilScott|LINK
You will need to manually update the references from Microsoft.Reporting version 18.104.22.168 to Microsoft.Reporting version 10.0.0.0 and you will need to change this in your web.config file as well.
Dec 15, 2011 03:25 PM|ahbenshaut|LINK
I just want it in my toolbox!! :)
silly drag and drop...sighs...
Dec 15, 2011 03:32 PM|N_EvilScott|LINK
I see.. you just like to drag and drop and not understand whats actually going on :P
Ok fine then, try right clicking and Choose Items on a toolbox tab.
Next under the .NET Framework Components tab, sort by Namespace and look for Microsoft.Reporting.WebForms.
Drag the Assembly Name column to expand it so you can see the version numbers.
Select all the ReportViewer goodies for Microsoft.Reporting.WebForms (10.0.0.0)
Dec 15, 2011 03:39 PM|ahbenshaut|LINK
yea..I may be a bit lazy...I do like to understand what's going on but I was under the impression that once the redistributable was installed, I'd be able to choose it from the .Net Framework Components tab. The part I don't understand is why its not being
I did try that but I'm only seeing Microsoft.Reporting.Webforms(22.214.171.124). I did install the 2010 redistributable...
Dec 15, 2011 03:42 PM|N_EvilScott|LINK
Oh yes thats right, you are using VS 2005, its incompatible with that. You can still process it, but you will not be able to directly reference it in 2005.
In short, it's too new lol
So once again you will need to update it manually! :D
Dec 15, 2011 03:47 PM|ahbenshaut|LINK
Well, fine, manually it is! :)
I do appreciate the info though :)
Still not enough to get my employer to purchase VS2010...
Dec 15, 2011 03:54 PM|N_EvilScott|LINK
Ok ok here is how to do it manually :P Make the following changes to your References, aspx page containing the reportviewer, and to your web.config file...
Step 1: References
Right click on Project > Property Pages
Click on References
Remove Microsoft.ReportViewer.Common version 126.96.36.199
Remove Microsoft.ReportViewer.WebForms version 188.8.131.52
Click Add, and on the .NET Tab add the following items:
Microsoft.ReportViewer.Common version 10.0.0.0
Microsoft.ReportViewer.WebForms version 10.0.0.0
Step 2: web.config file
// Update your web.config assemblies to reflect version 10.0.0.0
<add assembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
// add or update the following HTTP Handler as well
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false"/>
Step 3: aspx page
// update your version to 10.0.0.0 by making the change below to your aspx page containing the report viewer.
// also don't forget the ReportViewer 2010 REQUIRES a ScriptManager on the page.
<%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>
Dec 15, 2011 04:03 PM|N_EvilScott|LINK
Oh and I forgot to mention, when you make these changes it will probably show up as an error on the aspx page, but when you actually launch the website, it will work fine as long as ReportViewer 2010 is installed. It doesn't work in the vs 2005 designer
because it doesn't support or contain the necessary items to make it work inside of visual studio.
And if Visual Studio 2010 is too expensive you could always just use Visual Web Developer 2010 for your report needs :P
Dec 15, 2011 04:14 PM|ahbenshaut|LINK
woohoo! awesome sauce! :)
thanks a bunch :)
Dec 15, 2011 04:15 PM|N_EvilScott|LINK