How do I set a report to print in landscape mode, I know the printer can change it but the report width is stuck at 8.5
Printable View
How do I set a report to print in landscape mode, I know the printer can change it but the report width is stuck at 8.5
Report.PaperOrientation = crLandscape
but where do I put the paperorientation, niether the viewer object or the report class support it and where/what do I declare as "crLandscape"?
I'm using VB.NET and the Crystal Reports Viewer component.
I am using VB6. I put the code in my VB just before I print the report. For example, here is the code that prints out 5 copies of a report to a printer selected prior.
Report.SelectPrinter glbPrinterDriver, glbPrinterName, glbPrinterPort
Report.PaperOrientation = crLandscape
Report.PaperSize = crPaperLegal
If glbPrinterDestination = 0 Then
glbReportForm = "frmProduction"
CRViewer.Show vbModal
Else
Report.PrintOut False, 5
End If
glbPrinterDriver, glbPrinterName, glbPrinterName, and glbprinterDestination are chosen in a routine that is executed earlier.
glbReportForm is the name I pass the CRViewer. Its load routine would say:
Select Case glbReportForm
Case "frmProduction"
CRViewer1.ReportSource = frmProduction.Report
Case ...
Case ...
End Select
CRViewer1.ViewReport