Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jun 2002
    Location
    Gulf
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Visual basic question

    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
    =======================
    =======================
    WebMaster
    =======================
    =======================

  • #2
    New Coder
    Join Date
    Oct 2002
    Location
    nj
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •