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
Re: how to customsize page size for printing report
Quote:
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..
Quote:
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
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
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
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
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