Results 1 to 4 of 4

Thread: DataReport Master...Help.

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2004
    Posts
    75

    Red face DataReport Master...Help.

    Hi I tried this code to change my DataReport Paper Orientation..

    Printer.PaperSize = vbPRPSLegal '10x14
    Printer.Orientation = vbPRORLandscape 'Landscape

    But it doesn't work.. Everytime I show the DataReport, it doesn't change..

    I try to use even Common Dialog box but it doesn't work.. Any idea even an API code?

    Kindly help me what code should I do?
    Have a nice day.
    Shailesh & Rajani

  2. #2
    Fanatic Member Bombdrop's Avatar
    Join Date
    Apr 2001
    Location
    St Helens, England, UK
    Posts
    667
    This only works with Service pack 4 and onwards ( definatley aone of the latter service pack) download the lattest service pack from microsoft thats service pack 6

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Feb 2004
    Posts
    75

    Red face VB6.0 Data Report Master Plz Help

    I already have Service pack 5 installed on machine and it is not solving my problem.
    Have a nice day.
    Shailesh & Rajani

  4. #4
    Fanatic Member Bombdrop's Avatar
    Join Date
    Apr 2001
    Location
    St Helens, England, UK
    Posts
    667
    It's not the Printer object you need to look at but the report object itself.

    VB Code:
    1. Option Explicit
    2. Public Con As New Connection
    3.  Public Rec As Recordset
    4. Private Sub Command1_Click()
    5.  
    6. Set Rec = New Recordset
    7. Con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Microsoft Visual Studio\VB98\BIBLIO.MDB;Persist Security Info=False"
    8. Rec.Open "select * from Authors", Con
    9. With DataReport1
    10. Set .DataSource = Rec
    11.     .Orientation = rptOrientLandscape 'Set the report orientation not the printer
    12.     .Show
    13.     .PrintReport
    14. End With
    15.  
    16. End Sub

    Hope this helps

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