Click to See Complete Forum and Search --> : how to customsize page size for printing report
anshu.rahul
Apr 28th, 2006, 09:52 AM
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
mikee_phil
Apr 30th, 2006, 04:12 AM
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
mikee_phil
May 1st, 2006, 10:08 AM
check your email i created a sample code that print pages from a datareport of different page setup
jobs_arghya
Aug 4th, 2006, 12:25 AM
mikee_phil can you please send the same sample code coz I am facing the same problem.
Thanx in advance
Hack
Aug 4th, 2006, 06:10 AM
@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
Utpal Mehta
Aug 24th, 2006, 05:19 AM
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
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.