Skip to Content
0

Reading the duplex setting in a Crystal Reports formula?

Nov 22, 2017 at 08:03 AM

40

avatar image

It is easy to set a different left margin through a forumula, ie:

// Denna formel måste returnera ett värde i twips.
If Remainder (pagenumber,2) = 0 then 0 else 1440


But I only want to do this when the report is set to print duplexed. How can I detect that in a formula? There is a variable for PrinterOrientation, but not for PrinterDuplex.

CrystalReports for Visual Studio

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Vitaly Izmaylov
Nov 22, 2017 at 04:29 PM
1

There is a very useful document for Crystal Reports printing:

www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/40e40899-721e-2b10-b084-c7ed76af46f1

It says (page 23): Crystal Reports does not control a printer's duplex printing ability. The printer driver for the
printer handles the duplex print control.
Share
10 |10000 characters needed characters left characters exceeded
Brian Dong Nov 22, 2017 at 05:30 PM
1

Hi Anders,

If you are running the report through a custom application, you can have your application query the printer for the duplex setting. If it is printing duplex then pass a parameter to the margin formula that will trigger the formula.

Crystal does very little communication in terms of printer settings so it has to be done external of the report.

Good luck,

Brian

Share
10 |10000 characters needed characters left characters exceeded
Anders Gustafsson Nov 23, 2017 at 07:26 AM
0

OK. That is what I feared :) I will pass the duplex setting to the report, via a parameter.

Odd though that there is a

CrystalDecisions::Shared::PrinterDuplex
Share
10 |10000 characters needed characters left characters exceeded