Results 1 to 5 of 5

Thread: Printer & Paper Size

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2003
    Location
    Bhutan
    Posts
    26

    Printer & Paper Size

    I have Developed a Crystal report and it takes paper size of fanfold 12" X 15". Now my problem is how can I set Report to Size 12"x15" and printer to Epson DFX 8500 through VB COde.
    Help Me

  2. #2
    Addicted Member cutamacious's Avatar
    Join Date
    May 2001
    Location
    INDIA >> Andhra Pradesh >> Hyderabad
    Posts
    185

    Re: Printer & Paper Size

    Originally posted by Sonamg
    I have Developed a Crystal report and it takes paper size of fanfold 12" X 15". Now my problem is how can I set Report to Size 12"x15" and printer to Epson DFX 8500 through VB COde.
    Help Me

    u can use


    commondialog1.showprinter 'to select the printer and paper size

    commondialog1.printerdefault = true ' to make it the default printer for VB app. to print


    to set the paper size.
    Cute Member

  3. #3

    Thread Starter
    Junior Member
    Join Date
    May 2003
    Location
    Bhutan
    Posts
    26
    Though I can do the way you suggest me.... but problem is after I select the Printer and Papersize the crystal report size remains same and points to other printer.
    Is there way through which code can control what ever changes I made through commondiloge.printer effect to crystal report too

  4. #4
    Addicted Member
    Join Date
    Nov 2003
    Location
    India
    Posts
    227
    loop through the printer's collection & set the default printer for your application to EPSON.

    like

    x = 0 ' it may be 1,2,3... depends upon your control panel installed printer settings.

    set printer = printers(x)

    And then run Crystal Report
    See you,
    -Jai
    [Friends Never Say Good Bye]

  5. #5
    Member
    Join Date
    Nov 2003
    Location
    Devron System
    Posts
    53
    as Jaiboy mentioned...

    --------------
    For Each X In Printers
    If UCase(Trim(X.DeviceName)) = UCase(Trim(str_ReportPrinter )) Then
    Report.SelectPrinter Printer.DriverName, str_ReportPrinter, Printer.Port
    Report.PaperOrientation = crPortrait
    Report.PaperSize = crPaperA4
    End If
    Next

    -----------

    str_ReportPrinter is your printer name variable

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