Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

print to a specific printer tray

Status
Not open for further replies.

longda

Programmer
Jul 24, 2001
66
US
I need help trying to print to specific printer tray. I have done a few key word searches and found a link to the universal thread that didn't seem to work, other than that I found nothing.

My problem is that I only have 7 reports but they all print to one priter execpt one. I need to print two reports to tray1 (the bottom tray) and the rest to tray2 (the top tray). My development printer is different than the one the reports will actually print on during run time.

If anyone can help me I will be most thankfull

Dave Long
 
You can modify your reports (each one of them) and modify the PageSetup and select the tray for that report and re-save your report, and recompile.
 
mgagnon
Thanks for your help. One question though.

Since the printer I am using when I edit the report in design time is different than the printer that will print it during run time, will the changes still take affect. Or should I install the print drivers on my computer first and then change the page setup of the report. Will this make a difference. There is no way to test other than going to the site which will run the program and use their printer, that is why I am asking.

Dave Long
 
Dave,
I found this reference at MSDN, - "HOWTO: Change the Default Source of Printer Programmatically (Q157629)". Note: It does require you to build some "outside" code.

While I haven't tried it, you should be able to change appropriate setting (DEFAULTSOURCE?) in the Expr memo field in the .FRX file (in the first record). I have used this technique to change the COPIES value.

Rick
 
Thanks for your guys help.

Rick the idea of using the Expr memo field helped alot, the other way seemed like alot of work for this app but I'll keep it in mind in the future. I also found the link to microsoft that explains using .frx file


I think that by going through the page setup when modifing the report it saves the values in the Expr memo field, but being able to see the exact values is great.
Thanks again for all the help

Dave Long
 
[red]
Since the printer I am using when I edit the report in design time is different than the printer that will print it during run time, will the changes still take affect. Or should I install the print drivers on my computer first and then change the page setup of the report. Will this make a difference. There is no way to test other than going to the site which will run the program and use their printer, that is why I am asking.
[/red]

When I run into this, I usually install the client's printer driver on my own box (you can have as many as you want), switch that one to default printer, and do the steps above.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top