VB6 with Crystal Report 8.5 printing without view in default printer
I am using Crystal Report 8.5 in VB6 to Print Invoice .. I am developing this application for my customer. I wish to print invoice without view the report and it should directly print to printer without view in crviewer.
I don’t know which printer customer is using. So, Thru coding I wish to print report customer’s default printer.
Here is my code. But no print out coming.
If I choose crystal report 8.5 right click =>Designer=>Printer setup and then select printer I will work.
No printer option is not displayed in printer setup dialog box.
Please give me option to print default known printer
Re: VB6 with Crystal Report 8.5 printing without view in default printer
I do not use Crystal so can't say for sure but the default printer should be the default. There should be no need to call printersetup nor assign a printer at all.
Have you tried it without that first line?
I use Active Reports the print method is
Code:
ActiveReport1.PrintReport False
The false tells it not to display the printer dialog and use the current default printer
A setting of True tells it to display the printer dialog so the user can choose where to print.
Also worth noting is that the default printer in this case may or may not be the system default printer.
As far as the program is concerned the default printer is the one currently set in VB via the printer object which is by default the system default printer but can be changed via code using the Set Printer method of VB
Last edited by DataMiser; September 19th, 2017 at 12:41 PM.
Re: VB6 with Crystal Report 8.5 printing without view in default printer
Originally Posted by DataMiser
I do not use Crystal so can't say for sure but the default printer should be the default. There should be no need to call printersetup nor assign a printer at all.
Have you tried it without that first line?
I use Active Reports the print method is
Code:
ActiveReport1.PrintReport False
The false tells it not to display the printer dialog and use the current default printer
A setting of True tells it to display the printer dialog so the user can choose where to print.
Also worth noting is that the default printer in this case may or may not be the system default printer.
As far as the program is concerned the default printer is the one currently set in VB via the printer object which is by default the system default printer but can be changed via code using the Set Printer method of VB
Re: VB6 with Crystal Report 8.5 printing without view in default printer
Originally Posted by DataMiser
So is it printing on a different printer?
Have you added any code into your project that changes the default printer for the project?
What happens if you use True on that line instead of False?
I used because i have to select one printer in Crystal report Designing time. I selected one of my printer. I don't know customers system default printer. The printing is fine in my system. But there is no printing in customer computer. His laser printer model is different. How can i overcome. I have forced to selected one printer in my crystal report designing time. PFA
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.