Web Printing and Direct Printing of Crystal Reports and ActiveX Printing

Source: Internet
Author: User
In the crystal report, <CR: crystalreportviewer "printmode =" pdf "/> sets printmode = ActiveX. After the plug-in is enabled, click the print button to bring up a small dialog box, but it is blank.

Solution:

Attach to server
1. crredist2005_x86.msi
2. crredist2005_x86_chs.msi
3. crystalreports10_net_embeddedinstall.msi (serial number: A6860-0900000-U70005X)

Printjoblimit of the Registry: 0, otherwise there will be restrictions.

Download printcontrol. Cab
Create a. html
<HTML>
<Object ID = "crystalprintcontrol" classid = "CLSID: BAEE131D-290A-4541-A50A-8936F159563A" codebase = "http: // 192.168.0.1 \ printcontrol. cab "# version =", "viewastext> </Object>
</Html>

When the client prints it for the first time, install the ActiveX control ~

After the PDF file of the Crystal Report printmode is changed to ActiveX, the report will be printed directly, but it will always be downloaded. In the past, an ActiveX will be downloaded, but it seems that the official download will not be available! At last, I used Xunlei to put it on the server.

First download printcontrol. cab from: http://support.businessobjects.com/CRforVS2005/PrintControl.cab #

Method 1:

A Method of your own, but the installation speed is relatively slow, directly decompress printcontrol. run printcontrol. DLL is added to reference, so no <add key = "url" value = "http: // localhost/printcontrol is required. cab "/>, it seems that the absolute path is required.

Method 2:
Insert the following content in Web. config:

<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: // localhost/printcontrol. Cab"/>
</Printcontrol>
</Crystalreports>
</Businessobjects>

Note that only Internet Explorer supports ActiveX control. If it is printed from a non-Internet Explorer client (Firefox, Safari, Mozilla, and so on), it will return to the PDF to publish the corresponding speaker.
============================================

After my tests, I updated the IE patch and enhanced the security of the touch window. Therefore, it is estimated that the installation will fail even if you put the file on the local server, unless you writeCodeThe installation prompt is displayed only when two touch windows are displayed consecutively, but this is impossible for users.

I tested the code and wrote it into the touch window. When the page is opened, the execution will automatically pop up and an error will occur. Unless you set a timer, it will be normal to pop up after 30 seconds or one minute.

Therefore, you can download the cab and put it on the local server. Then, write the following code and put it on a separate page.

Download http://support.businessobjects.com/crforvs2005/printcontrol.cabto your server.

<Object ID = "crystalprintcontrol" classid = "CLSID: BAEE131D-290A-4541-A50A-8936F159563A" codebase = "http: // 127.0.0.1/Rpt/printcontrol. cab "# version =", "viewastext> </Object>

# Version is the version number. If you are using another version, modify the version number.

Next, the report fails to be loaded, because it is normal for me to create a new Empty Project, and the code is certainly no problem, so the problem must be solved on the web. in the config configuration file, because my environment is complex, the web. config is a lot of preparation. Let's split it one by one. When it is removed to <identity impersonate = "true"/>, it is normal. It cannot be set to true, change it to <identity impersonate = "false"/>.

After debugging, there will be a lot of trouble in the future. Let's solve it one by one.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.