
vb6 data reports - exporting a landscape report
Quote:
>Well, I have finally got vb6 data reports to print in Landscape mode.
>However, it is still impossible to Export (save) the report as Landscape,
>still giving the same "Report width is greater than page width" error
>message.
>Does anyone know how to export a report in Landscape mode???
Chris,
It sounds like you are experiencing the same problem that occurs in a
print preview, whereby the output is formatted based on the
orientation of the printer. If you are using Pageset.dll as your
printer orientation component, try making a call to the PrinterControl
object of Pageset using a procedure such as this one:
Public Sub SetPrinterOrientation (intMode As Integer)
Dim obj As PageSet.PrinterControl, prtX As Printer
On Error GoTo errorhandler
Set obj = New PrinterControl
If intMode = 2 Then
obj.ChngOrientationLandscape
Else
obj.ChngOrientationPortrait
End If
On Error GoTo 0
Exit Sub
errorhandler:
MsgBox Err.Description
End Sub
BTW, you can get Pageset at:
http://support.microsoft.com/support/kb/articles/q197/9/15.asp
Dan Ellenburg, MCSD
Independent Consultant
Visual Basic, Access