cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Hi:

The first thing I'd like you to do is have a look at the two docs introduced here:

Now, your issue is complicated with two nasty variables:

Dot Matrix printers

Custom Paper Size

One advice re. Dot Matrix; make sure they are not from the dark ages. E.g.; relatively recent manufacture and very up to date as far as the printer drivers are concerned.

Custom paper size doc is coming sometime next month. But there is info here on SCN. A search  on something like 'crystal print custom paper' should return a few useful resources.

Oh, and you may want to consider using the PrintOutputCOntroller from the InProc RAS SDK. If you search you will find a number of posts by Don Williams (and some even have sample app attached).

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

Former Member
0 Kudos

Great, thanks Ludek.

I have no control over the printers themselves.  One client is 2 hours away, the other is on the other side of the continent, so I can't even get to them to play on their computers except via internet.  I'd love to stick my notebook on their networks and run everything from VB so I can trace things better but it's not a good option right now.

Those documents look like a great start.  I am looking forward to the next three.

I've been searching the internet and this site for about a week now and have found a couple of Don's posts but the code I've found is all C# and my skills at reading it are a little weak, though I think I am getting some of it.

I also found article 1561333 which I believe is the In Proc RAS SDK you are referring to but again it's in C# so I am having some troubles with it.

So is the In Proc RAS SDK just another model that can be used to work with the CR documents?  Is it is similar to the CrystalReportViewer and the ReportDocument?  Is there any extra licensing to use it for desktop Winforms applications distributed to clients?

Thanks again for the direction.  I've got my weekend reading ready now.

Answers (0)