CodeKicks.com
Focus on Microsoft Technologies - Tutorials, Articles, Code Samples.

Monday, February 12, 2007

How to print directly to a printer instead of PDF in a CR 10 ASP.NET application


Reports Viewer control to print a report directly to


a printer?



Resolution

To set the Print button to print a report directly to


a printer, set the 'Print Mode' property to "Active X"


in the Crystal Report Viewer control.



You can enable the ActiveX Print option using two


methods:



Method One


-----------



1. Right-click the Crystal Report Viewer control and


select 'Properties'.



2. Set the 'Print Mode' property to "Active X".



Method Two


------------



Add the following line of code to the Crystal Report


Viewer control:



CrystalReportViewer1.PrintMode =


CrystalDecisions.Web.PrintMode.ActiveX



====================


NOTE:



For a sample application that demonstrates how to


use the 'PrintMode' property, go to


http://support.businessobjects.com/search and


download:



Csharp_web_samples.exe



Run Chsarp_web_samples.exe and extract


Cr10_csharp_web_clientprinting.zip for the 'PrintMode'


property example.

Post a Comment

thaiphu007 said...

aaa

Nakeetula said...

I have an error with IIS 7.0
When i click 'print', a window show a 404.0 Not Found error

Anonymous said...

Thank u, Now Its Working :-)