cancel
Showing results for 
Search instead for 
Did you mean: 

Reading the duplex setting in a Crystal Reports formula?

anders_gustafsson
Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

vitaly_izmaylov
Employee
Employee

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.

Answers (2)

Answers (2)

former_member292966
Active Contributor

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

anders_gustafsson
Participant
0 Kudos

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