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 options

Status
Not open for further replies.

Snakeroot

Technical User
Oct 4, 2006
112
US
I'm using VB.NET 2005 and CR XI R2.

I'm trying to loop through about 1200 reports and have them automatically print out in a tabloid booklet style.

I have setup a second (in Microsoft terms) "printer" (using only 1 "print device") that has all the defaults set to a tabloid size booklet style print job with the first page coming from tray 3, then inside pages coming from tray 4, and then passed along to the finisher where the whole report is folded and stapled and the booklet comes out on the finisher tray. Basically, each page in the crystal report (sized to 8.5 x 11) gets printed on half of a tabloid sized piece of paper, which constitutes one page.

The paper size of the booklet is determined in the advanced options of my printer driver. So, whereas my crystal report is 8.5 x 11, in my printer driver, I can specify to use tabloid sized paper to create a booklet where each perceived page is 8.5x11.

I am using the reportdocument class to set parameters and the default printer, etc. without having to view the report first.

I have the code to be able to loop through the reports and print one at a time, but when I use .printtoprinter, it only recognizes the printer's base level defaults like booklet style and page orientation. It's printing a booklet, but it's doing so on an 8.5x11 sized paper from the wrong tray (it's shrinking the printout to fit on a half page of 8.5x11).

I'm a novice programmer and I'm not sure if there's another way to go about printing a crystal report. I have found that if I view the report first and use the print button on the Crystal Report Viewer's toolbar, it pulls up the common printer dialog screen. Since all the default settings are correct, I can just hit OK (or Print or whatever the button says) and it will print in booklet form just like I want.

Does anyone know if there is a way for me to pull up that common print dialog box, click print, and then have the same settings used for each report (1,200 times)? What I don't want to have to do is hit print 1,200 times.

Any hints or nudges in the right direction on this would be greatly appreciated! TIA!


SR

 
I figured out that crystal was pulling from Printing Preferences, rather than Defaults. Once I changed my Printing Preferences, the booklet printed out correctly.

Thought I'd follow-up in case this can help someone else down the road.

SR
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top