Click here to Skip to main content
15,889,200 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi All,

How to solve a problem for Crystal report viewer when click on the print button it gives only export as PDF and not giving the list to select a local client printer.

It was working fine and we can select local printers perfectly before and suddenly it shows PDF only, we have tried to investigate online with no success

Crystal report PrintMode is set to ActiveX in HTML and in VB.net code

We have tried to add assemble to web.config
<add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>

and vb.net code at Page_Init
CrystalReportViewer1.PDFOneClickPrinting = False

PrinteControl version is the same at the IIS server and the client.

Using:
IIS 7
Crystal Version 13.0.2
Browser: Internet Explorer 11 or Chrome both gives the same message, popup blocker is off

Thanks in advance,

Ahmed Bayoumi
ahmed.bayoumi@live.com
Posted
Updated 18-Jan-14 23:51pm
v2

In addition to PrintMode, you need to register a user control of crystal report (PrintControl.dll)
you can do dis manually or add following lines in your web.config file -

XML
<configuration>
    <configSections>
        <sectionGroup name="businessObjects">
            <sectionGroup name="crystalReports">
                <section name="printControl" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=null"/>
            </sectionGroup>
        </sectionGroup>
    </configSections>
    <businessObjects>
        <crystalReports>
            <printControl>
                <add key="url" value="http://SrVrName/TestApp/PrintControl.cab"/>
            </printControl>
        </crystalReports>
    </businessObjects>    </configuration> 


considering your server name is "SrVrName" and virtual directory is "TestApp"

Make sure version of your crystal report matches with version of DLL
e.g. if your crystal report version is 10.5.3700.0 then your printcontrol.dll should have version 10.5.XX.XX

Try this link to download - http://seoanalyses.com/download/crystal%20print%20control%2010.5%20download&t=1[^]
 
Share this answer
 
Comments
ahmed.bayoumi 21-Jan-14 5:25am    
We have tried the above before the PrintControl dll version 13.0.2.469 but same PDF message still displaying, we tried the link
I think main problem here is that Crystal Reports client printing feature relies on ActiveX which is not allowed by IE11 if it is not forced to render pages as IE9 or earlier versions. That's why Crystal tries to export the report to PDF instead of printing. I should avoid ActiveX printing as it works with IE only and I'd go for some other ways. Here are some alternatives:

Crystal Reports Print Problem in Firefox and Chrome[^]

http://forums.asp.net/t/1956137.aspx?Crystal+Report+Print+in+ASP+NET+but+not+printing+in+IIS[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900