zadjali2000
11-18-2002, 05:09 PM
Hi everybody,
I just want to know how to make the datareport in visual basic to be in a landscape view.
that's all and thanks
* I don't have and i can't get crystal report
rcreyes
11-22-2002, 04:06 AM
You have to set the orientation using the PRINTER objectThe following code searches all available printers to locate the first printer with its page orientation set to Landscape, then sets it as the default printer:
Dim X As Printer
For Each X In Printers
If X.Orientation = vbPRORLandscape
Then
' Set printer as system default.
Set Printer = X
' Stop looking for a printer.
Exit For
End If
Next
Or if you can set the printer orientation if you know what printer the user will be using by the ff code:
Object.Orientation = vbPRORLandscape
to reset the printer to Portrait you simply issue the ff code:
Object.Orientation = vbPRORPortrait
Hope this is what you looking for:!!!
Thanks,
Ray