[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Printing a Crystal Report printer in VB6 to a different printer, but so that it actually prints and doesn't hang.

Posted on 2011-03-09
6
Medium Priority
?
645 Views
Last Modified: 2012-05-11
I have a vb6 app using Crystal Reports 10.  I can change the printer in code using:
    CrRpt.SelectPrinter PrinterDriver, PrinterName, PrinterPort
This works fine for most printers, but not all.  For example, selecting Brother HL-5140 (in my code using VB PrinterDialog control), my code then sets the printer (code line above) and tries to print the crystal report later.  The printer status lights up amber for several seconds, then turns back to green and never prints.  If I set the same printer as the windows default printer it works fine.  My code works for some printers but not all (Ricoh is a problem).  I can print to the Brother HL-5140 just fine if it is the Windows Default printer.  Any ideas?
0
Comment
Question by:Willbros
  • 2
  • 2
5 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 35087094
What printer was the report built against?

mlmcc
0
 

Accepted Solution

by:
Willbros earned 0 total points
ID: 35112733
The CR report in questjion was built against the Brother HL-5140 printer.  I just went and change that CR report to 'No Printer', saved it, set the Windows Default to a different printer, ran my application, changed in my software's Printer Setup to use the Brother, and WALLA, it printed!  I then tried to print another report that was still saved as 'built against the Brother', and DOH, it didn't print.  Changed the 2nd CR report to NOT use a pritner, and WALLA, it now works.  This now works on my machine/printer setup, but will setting 'No Printer' in CR dev mode take care of other clients of my software where they use different printers entirely?

Is this a known issue with CR?  I'm using Version 10, SP3.  I had issues with SPs after 3.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 35113374
I don't know.  I had just the opposite experience.  I built/revised reports on one of my machines that didn't have a printer driver loaded since I didn't have a printer.

WHen deployed to the user's machine, they couldn't print.  I checked the reports and they all had the NO PRINTER set.  When I installed a printer driver (I used the users driver so they could have a color option) and then they could print.
All I did was reopen the reports and click the NO PRINTER off.  I don't know if it is because I had no printer loaded and loading one then saving with the NO PRINTER option on if it would have worked or not.

mlmcc
0
 

Author Comment

by:Willbros
ID: 35140958
I think you have to change your code to this:

If prn1.fails then
pran b
else
me.spit.others
end if
0
 
LVL 39

Expert Comment

by:hdhondt
ID: 35399237
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
Suggested Courses

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question