Click to See Complete Forum and Search --> : Crystal Report Print (Landscape/Potrait) Problem


Mr_Sam
July 11th, 2008, 02:06 AM
hi...

i am using VB.Net 2005 and built in crystal report which comes with .net2005.

when i print a report of landscape it will print in potrait. here is the code...



--object for frmReport

Public RptRs As New ReportDocument()

--print command

Private Sub TSBPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TSBPrint.Click
fReport.crViewer.ReportSource = fReport.RptRs
fReport.crViewer.PrintReport()
End Sub

--Preview Command
Private Sub TSBPreview_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TSBPreview.Click
SetReportDisplay(fReport)
End Sub


--SetReportDisplay function
Public Sub SetReportDisplay(ByRef fReport As frmReport)
fReport.DisplayReport()

' Setting Report Buttons (Rights)
fReport.crViewer.ShowPrintButton = pcURPrint
fReport.crViewer.ShowExportButton = pcURSave
If fReport.Visible = False Then
fReport.Show(fMainForm)
Else
fReport.Focus()
End If
End Sub




--------------------------------------------------------------------------------------------
when i first preview the report it will show in landscape, and if from that preview i give print command that will print in landscape, but when i direct command to print by function "Private Sub TSBPrint_Click" then it will print in potrait. i downloaded the utility named "crnet10win_en" to resolve this issue, but it will not work, what to do???