EgyEast EgyEast - 1 year ago 222
C# Question

How to change printer paper size to A6 or custom paper size in SAP Crystal reports?

I'm making report of custom papersize to be printed through C# windows forms application using SAP Crystal report.
While setting printer options by code in C# before printing , i don't find a way to set custom paper size within crystal report code.

rpt.PrintOptions.PaperSize =CrystalDecisions.Shared.PaperSize.PaperA5 ;

I wonder if there is there is a way to set custom paper size in print options like

rpt.PrintOptions.PaperSize =CrystalDecisions.Shared.PaperSize.myCustomSize;

Answer Source
  • From printer preferences in control panel > create custom paper size that you need
  • From crystal report > Rt. Click > Design > Page Setup From page options > Uncheck Dissociate formating page size and printer page size > choose custom paper size
  • Don't modify printer page size using code
  • Finally it would work without problems
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download