Quantcast
Channel: SCN : Unanswered Discussions - SAP Crystal Reports, version for Visual Studio
Viewing all articles
Browse latest Browse all 2556

Print Custom Size Report using PrintToPrinter function

$
0
0

Hi all,

 

I am using Crystal report 13.0.2000.0 runtime v2.0.50727 with Win7 .NET Winforms application.

 

I need to print custom size labels on Zebra printer by using PrintToPrinter command. I set the following parameters in my code:

 

MyReportDocument.PrintOptions.DissociatePageSizeAndPrinterPaperSize = True

MyReportDocument.PrintOptions.PaperOrientation = PaperOrientation.Portrait

MyReportDocument.PrintOptions.PrinterDuplex = PrinterDuplex.Simplex


printPrompt.PrinterSettings.DefaultPageSettings.PaperSize.Height = 400

printPrompt.PrinterSettings.DefaultPageSettings.PaperSize.Width = 400

 

oLayout.Scaling = PrintLayoutSettings.PrintScaling.DoNotScale

 

MyReportDocument.PrintToPrinter(printPrompt.PrinterSettings, printPrompt.PrinterSettings.DefaultPageSettings, False, oLayout)

 

The problem is that the report keeps using the driver settings for the paper (6x2), and I would like to use my custom 4x4 size.

 

I know that I need to disassociate printer. But when I do so, the system refuses to use DoNotScale setting, and scales to fit the size difined in the driver. The driver itself allows to override the settings:

 

Is there a way to override driver settings and print custom size?

 

Thank you.

 

Helen.


Viewing all articles
Browse latest Browse all 2556

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>