Discussion Locked

Selection of paper source using VB6

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
How do I select a paper source when producing reports which require different types of paper? The printer has 3 trays and I would like to use different types of paper for each tray. Depending on the report I would like to select the paper source before I print.

5 replies

by sl-campbell

You didn't mention what you are programming with, or what type of reporting program you are using. I'll assume VB6 and CR.

If you are using VB you can set the paper bin using the printer object on the desired printer (Printer.paperBin =)

If you are using the CR OCX or Dll you can tell it to add the printer set-up icon to the top of the report.

With-in CR you have to use the printer set-up.

by miss kitty

Put a common dialog control and define it as a printer control. This works just like the printer control does in word or excel. The user can go into the printer properties and select what paper tray and print fonts that they want to use. Here's some sample code:
Dim BeginPage, EndPage, NumCopies, Orientation, i
' Set Cancel to True.
CommonDialog1.CancelError = True
On Error GoTo ErrHandler
' Display the Print dialog box.
CommonDialog1.ShowPrinter
' Get user-selected values from the dialog box.
BeginPage = CommonDialog1.FromPage
EndPage = CommonDialog1.ToPage
NumCopies = CommonDialog1.Copies
Orientation = CommonDialog1.Orientation
For i = 1 To NumCopies
' Put code here to send data to yourprinter.
Next
(this does not include code for more than 1 copy, you'll have to code that in)
Cathy
covcat@riverstonegrp.com

This discussion is closed to new replies.