Search code examples
c#winformscrystal-reports

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


I'm making report of custom paper size 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;

Solution

    • 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