Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 320
  • Last Modified:

Crystal inVB and Printing ?

Hi
I am using Crystal 7 and VB6 on a project

I need to be able to select the printer i want to print to when i run a Crystal report.

I am using the Crystal OCX on a form to generate the reports. Now standard is when u select the print button, Crystal picks up the printer which has been set to default on the pc, i need to be able to select a printer first...

is this possible


thanx

Craig
0
CraigLazar
Asked:
CraigLazar
1 Solution
 
rinksno1Commented:
Hi,
I am not sure whether this will work with Crystal Report Ver 7, try doing :

CrystalReport1.printerSelect

before printing the report, this will open up the Print Dialog box which lets u select a printer.

i have tried this with Crystal Report 8.5.

rinks
0
 
rinksno1Commented:
Hi,
I am not sure whether this will work with Crystal Report Ver 7, try doing :

CrystalReport1.printerSelect

before printing the report, this will open up the Print Dialog box which lets u select a printer.

i have tried this with Crystal Report 8.5.

rinks
0
 
mlmccCommented:
I think that option was added in CR8.  Also it is for the RDC not the OCX.

You can use

ReportNameVariable.PrinterName = "A printer"

I created my own printer setup form so I could control some things.  I'll post it on the web and let you know where it is.

mlmcc
0
 
anand2kCommented:
hi
u can simply use common dialog box control
and call showprinter method to do the printer setting



bye
0
 
CraigLazarAuthor Commented:
Hi guys thanx for the input
i got it working where i am using the selectpriner property and passing it the printer name, driver and what port it is on

and it is working

thankx for the help

cheers

Craig
0

Featured Post

Technology Partners: 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!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now