Quantcast
Channel: SCN : Discussion List - SAP Crystal Reports, version for Visual Studio
Viewing all articles
Browse latest Browse all 3636

Crystal Report 2008 & Visual Studion 2008 winform after print Page Orientation incurrent

$
0
0

Symptom

Page orientation changes from landscape to portrait after printing in Crystal Report Viewer

 

Environment :

Crystal Report 2008 Version 12.2.0.290

Visual Studio 2008 Version 9.0.30729.4462

the label size  is "60mm*40mm"

 

Picture:

Crystal Report Setup Picture ->https://drive.google.com/file/d/0B9JKKGV3x6VDS3FVbHYyenA0d3M/edit?usp=sharing

Windows form process Picture ->https://drive.google.com/file/d/0B9JKKGV3x6VDNjAtNkNQZXMzSUU/edit?usp=sharing

Print Label  ->https://drive.google.com/file/d/0B9JKKGV3x6VDR0l2VkJmT2VrWE0/edit?usp=sharing

 

 

Source Code

                int rawKind = 266 ;

        ReportDocument reportDocumentAll = new ReportDocument();

        reportDocumentAll.Load(sREPORT_NAME);

 

                PrintDocument doctoprint = new PrintDocument();

                doctoprint.DefaultPageSettings.Landscape = false  ; //not working

                doctoprint.PrinterSettings.PrinterName = sPRINTER_NAME;

      

 

                SetDocParameter2Parameter(reportDocumentAll, "@PARENT", sLPN_SNID, "@WAREHOUSE", sBATCHNO);

                ChangeReportDataBase(reportDocumentAll);

                reportDocumentAll.PrintOptions.DissociatePageSizeAndPrinterPaperSize = true ;

                reportDocumentAll.PrintOptions.PrinterName = sPRINTER_NAME;

                reportDocumentAll.PrintOptions.PaperOrientation = CrystalDecisions.Shared.PaperOrientation.Portrait ;  //not working

                reportDocumentAll.PrintOptions.PaperSize = (CrystalDecisions.Shared.PaperSize)rawKind;

                reportDocumentAll.PrintToPrinter(1, false, 0, 0); 


Viewing all articles
Browse latest Browse all 3636

Trending Articles



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