Crystal Report dual-sided printing

Source: Internet
Author: User

In a project, the customer asked the daily report to be printed on both sides, so how to use the Crystal Report to achieve dual-sided printing;

By searching for materials, you can find an attribute in the Crystal Report object that is used to set double-sided printing.

Report. printoptions. printerduplex

Printerduplex is the crystaldecisions. Shared. printerduplex enumeration attribute and its value is

Default

; Horizontal

; Simplex;

Vertical

Use the following statement:
Crystalreport report = appmodule. getcrystalreport ("rptwaybilldayreport. rpt", this. dataset );
Report. printoptions. printerduplex = crystaldecisions. Shared. printerduplex. horizontal;
Report. Preview ();

Set to bidirectional printing. When the "print" button in the pop-up report preview window is output, it does not work.

The normal dual-sided printing should be that the printer automatically outputs all the odd pages. After the odd pages are printed, a prompt window will pop up, prompting you to manually change the paper, click "OK" to continue printing the even page;

After multiple tests, we found that printing in the Report. Preview () preview window was used, and the "double-sided printing" option in the displayed printer settings window was not set;

Therefore, if preview is not used, report. Print () is directly used. The dual-sided printing is successful!

The currentCodeYes:

Crystalreport report = appmodule. getcrystalreport ("rptwaybilldayreport. rpt", this. dataset );
Report. printoptions. printerduplex = crystaldecisions. Shared. printerduplex. horizontal;
Report. Print ();

Posted onRex. Ying reading (...) Comment (...) EDIT favorites

Refresh comment refresh page Back to Top

Blog homepage blog news flash programmer recruitment Knowledge Base

Powered by: the blog Park template provides: Hujiang blog
Copyright 2013 Rex. Ying

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.