?
Solved

Crystal inVB and Printing ?

Posted on 2003-02-27
5
Medium Priority
?
309 Views
Last Modified: 2010-05-01
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
Comment
Question by:CraigLazar
[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
5 Comments
 
LVL 3

Accepted Solution

by:
rinksno1 earned 200 total points
ID: 8040325
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
 
LVL 3

Expert Comment

by:rinksno1
ID: 8040334
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
 
LVL 101

Expert Comment

by:mlmcc
ID: 8042361
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
 
LVL 1

Expert Comment

by:anand2k
ID: 8042574
hi
u can simply use common dialog box control
and call showprinter method to do the printer setting



bye
0
 
LVL 4

Author Comment

by:CraigLazar
ID: 8056418
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

801 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