Quantcast
Channel: SCN : Unanswered Discussions - SAP Crystal Reports, version for Visual Studio
Viewing all articles
Browse latest Browse all 2556

How to set report to print to 8.5" wide by 7" high page

$
0
0

I am getting confused by printer/paper handling between Crystal 2011 and my WinForms VB2010 application with CR Engine 13.0.9.1312 installed.

 

I thought when I send a job to a printer, if I don't override anything, the settings in the printer driver would control everything, including paper size.  But I am getting different issues with different clients and I cannot replicate all of them here in my office.  The two issues below, I believe are related but may not be, so if necessary, I can start another thread for one of them.

 

Issue 1: Client has two printers and uses the dot matrix printer (Oki I believe) set up for 8.5" W x 7" H NCR forms from my Crystal Viewer application.  It always prints 11" high instead of 7" but it does print to the proper printer.

 

Issue 2: Clients has two printers, laser and dot matrix.  Job only prints to the default printer, even if my program is set for the dot matrix.  If I change the default printer to the dot matrix, it prints fine, but every other program attempts to print to the dot matrix if it is not switched back.

 

My program has a form for setting report settings.  One setting is the printer and is set by name from a combobox from PrinterSettings.InstalledPrinters and stored as the name in my settings file.

 

I then send that to the ReportDocument.PrintToPrinter command.  (sorry, I would post all the code but the forum is not allowing me to paste today).

 

crReport.PrintOptions.PrinterName = "the printer name from the report settings in my program"
crReport.PrintToPrinter(1, True, 0, 0)

 

So for Issue 1, the page setup in the printer driver is set to 8.5x7 but the page always prints 11" with the total in the page footer at the bottom.  I created the report years ago in CR8.5 with the proper printer driver (no longer on my computer) with the proper 8.5x7 page size.  I have tried to update it to CR2011 and I still have similar problems, but I cannot set a page size in CR2011 in File, Page Setup to 8.5x7.  It always sets to landscape and prints landscape on my laser.

 

I have tried the Dissociate Formatting... checkbox add setting the page size to User Defined Size.  I get the 7" but it is 7" wide, not high and always switches to landscape.

 

I have tried to add an 8.5x7 page size to my Canon MF4370dn but it tells me the width is too wide for the  height.

 

My client goes back to the old printing method and it works fine with the same report.

 

For Issue 2, it is a different report but the concepts are the same.  It is using the printer name in the code above based on the printers attached to that computer.  I have confirmed that if the default printer is changed, the program works fine.  But the dot matrix is not the main printer.  It is only used for invoicing so they do not want all programs to use it as the default.

 

I'm not sure what to do to try and sort this out.  How do you set the proper print settings if the program will not honour what is in the printer driver settings, on the second case, not go to the defined printer by name.

 

Any ideas are greatly appreciated, TIA rasinc


Viewing all articles
Browse latest Browse all 2556

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>