Results 1 to 3 of 3

Thread: Landscaping the data report works, but printer defaults to portrait...

  1. #1

    Thread Starter
    New Member Xenomech's Avatar
    Join Date
    Oct 2002
    Location
    Winnipeg, MB
    Posts
    8

    Landscaping the data report works, but printer defaults to portrait...

    It seems as though some people have had problems getting their data reports to be landscaped. I had no problems doing this.

    However, when I try to print a landscaped report, the printer always defaults to portrait orientation. The code "Printer.Orientation = vbPRORLandscape" doesn't seem to be doing the job.

    Just so you know, I'm using VB6 SP5, and the following lines of code:

    Printer.Orientation = vbPRORLandscape
    DataReport.Orientation = rptOrientLandscape

    Any suggestions on how to change the printer object's orientation?

  2. #2

    Thread Starter
    New Member Xenomech's Avatar
    Join Date
    Oct 2002
    Location
    Winnipeg, MB
    Posts
    8
    Just to clarify, the report will print out landscape if I tell it to print without a prompt. It's only when I tell it to print with a prompt that it changes the printer orientation to portrait...even when the printer's default is set to landscape in the Windows Printers control panel!

  3. #3
    Lively Member
    Join Date
    May 2002
    Location
    Malaysia
    Posts
    103
    I still have problems trying to view in landscape...
    the code is the same like yours....what is the maximum sizes from the report ?....besides that I have this problem that when after viewing the report, I close it and try to click the preview button again, it got this error -2147418113 (800ffff)' Catastrophic failure.
    Here is my coding..hope you can help

    Private Sub cmdPreview_Click()
    UpdateRecord

    ISOProject.cmdReturnSupp_Grouping autoReturnToSupp
    rptreturnsupp.Show
    End Sub


    Private Sub UpdateRecord()
    Dim cnn As ADODB.Connection
    Dim strCnn As String
    Dim rst As ADODB.Recordset
    Dim rst1 As ADODB.Recordset
    Dim strSelect As String

    Set cnn = New ADODB.Connection
    cnn.Open "DSN=ISOmysql;UID=root;host=Dalvinderjit;DATABASE=JJCM_ISO_DB"

    Set rst = New ADODB.Recordset
    rst.CursorType = adOpenKeyset
    rst.LockType = adLockOptimistic
    rst.Open "ReturnSupplier", cnn, , , adCmdTable

    rst.AddNew
    ---
    ---
    ---
    rst.Update

Posting Permissions

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



Click Here to Expand Forum to Full Width