Results 1 to 6 of 6

Thread: how to customsize page size for printing report

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2006
    Posts
    17

    Question how to customsize page size for printing report

    dear friends,

    i am using visual basic 6.0 and oracle 9i.
    i am doing project for hostel management.

    i am facing problem in printing report.

    i want to print report of four different sizes using same printer.

    but i want to mention the page size in the code only so that the printer should directly print the desired sized report.

    how can this be done in vb6 data report.

    thanks in advance
    rahul

  2. #2
    Hyperactive Member
    Join Date
    Feb 2006
    Location
    Philippines
    Posts
    468

    Re: how to customsize page size for printing report

    i am using visual basic 6.0 and oracle 9i.
    i am doing project for hostel management.

    i am facing problem in printing report.

    i want to print report of four different sizes using same printer.
    this problem needs an API call on printer you should go to API sections there are lots of useful thread about API calls on printer setting.. i have my problem solved there..

    but i want to mention the page size in the code only so that the printer should directly print the desired sized report.

    how can this be done in vb6 data report.
    page size can be set on the datareport print button

  3. #3
    Hyperactive Member
    Join Date
    Feb 2006
    Location
    Philippines
    Posts
    468

    Re: how to customsize page size for printing report

    check your email i created a sample code that print pages from a datareport of different page setup

  4. #4
    Addicted Member
    Join Date
    Mar 2005
    Posts
    174

    Re: how to customsize page size for printing report

    mikee_phil can you please send the same sample code coz I am facing the same problem.
    Thanx in advance
    Last edited by Hack; Aug 4th, 2006 at 06:10 AM. Reason: Removed EMail address

  5. #5
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: how to customsize page size for printing report

    @jobs_arghya: I have edited your post and removed your email address.

    You should never post your email address in an open post on an open forum. Mail spam bots can pick that up and before you know it, your mailbox is full of junk mail. If you wish to share your email address with other forum members, please do so via our PM system.

    In addition, we prefer all answers to questions be publically posted rather than sent via EMail or PM. That way, everyone with a similar problem can benefit.

    Thanks.

    Moved to reporting section

  6. #6
    Junior Member
    Join Date
    Nov 2005
    Location
    Daman, India
    Posts
    19

    Re: how to customsize page size for printing report

    Try the following code: xReport is an report object (Crystal Report in my case)
    The code sets the Paper Size to A4 and orientation to Portrait..
    --------------------------
    Printer.PaperSize = vbPRPSA4
    Printer.Orientation = vbPRORPortrait
    xReport.SelectPrinter Printer.DriverName, Printer.DeviceName, Printer.Port
    xReport.PaperOrientation = crPortrait
    xReport.PaperSize = crPaperA4
    ----------------------------
    Utpal Mehta

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