Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Reports - Export to PDF in Landscape

Status
Not open for further replies.

SqueakinSweep

Programmer
Jun 20, 2002
945
GB
I have a CR, which is a landscape report. I populate it with data, pass it to a viewer which I dont show to the user, and instead export directly to a PDF file. The output always appears portrait. Does anyone any ideas how I force it to be landscape. The code below is the New Event of my subclassed Crystal Report. The only Landscape setting I can find is in the PrintOptions?
Code:
Public Sub New(ByVal sReporttoLoad As String, _
        Optional ByVal sPaperSize As String = "A4", _
        Optional ByVal bLandScape As Boolean = False)

Me.bLoaded = False
Me.zLoadReport(sReporttoLoad)

Select Case sPaperSize.ToUpper
   Case "A4"
        Me.oReport.PrintOptions.PaperSize = PaperSize.PaperA4
   Case "A3"
         Me.oReport.PrintOptions.PaperSize = PaperSize.PaperA3
End Select

If bLandScape Then Me.oReport.PrintOptions.PaperOrientation = PaperOrientation.Landscape

End Sub




Sweep
...if it works dont mess with it
 
Its ok...I worked around this problem, by changing the Paper Size to A3, orientation to Landscape. I can then scale the resultant PDF to A4 on printing.


Sweep
...if it works dont mess with it
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top