Hi Folks
The application I've been working on for a year is nearly finished, but I'm still having trouble with Crystal Reports misbehaving and not performing as I tell it to. I'm using the CrystalReportsViewer control from VB.NET 2008, and I've already narrowed down what I should be doing to force it to print my reports in Landscape Mode. Here's an example of the code I'm using to sent the report to print:
This works fine to print the report, but it is completely inconsistent as to whether the format will be portrait or landscape. The report itself is designed in Landscape mode. However half the time it prints in Portrait anyway. Since these reports are the important part of what my program does this problem is a non-starter.
Please, please help - is there some way I can force Crystal Reports to print these reports properly?
Thanks
The application I've been working on for a year is nearly finished, but I'm still having trouble with Crystal Reports misbehaving and not performing as I tell it to. I'm using the CrystalReportsViewer control from VB.NET 2008, and I've already narrowed down what I should be doing to force it to print my reports in Landscape Mode. Here's an example of the code I'm using to sent the report to print:
Code:
'dtWBLoads is a populated Data Table that provides values for the report
'crvLoads is a CrystalReportViewer object
'Waybill1 is a Crystal Report
Dim LoadsReport As New Waybill1
'Send Load Page to print
crvMTYs.Visible = False
LoadsReport.PrintOptions.PrinterName = objPS.PrinterName
LoadsReport.PrintOptions.PaperOrientation = CrystalDecisions.Shared.PaperOrientation.Landscape
LoadsReport.SetDataSource(dtWBLoads)
crvLoads.ReportSource = LoadsReport
crvLoads.Dock = DockStyle.Fill
crvLoads.BringToFront()
crvLoads.Visible = True
crvLoads.PrintReport()
This works fine to print the report, but it is completely inconsistent as to whether the format will be portrait or landscape. The report itself is designed in Landscape mode. However half the time it prints in Portrait anyway. Since these reports are the important part of what my program does this problem is a non-starter.
Please, please help - is there some way I can force Crystal Reports to print these reports properly?
Thanks