Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

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
?
624 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
6 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Suggested Courses

618 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