Using SelectPrinter 
Author Message
 Using SelectPrinter

I'm using the Crystal Report 8 ActiveX Designer Run Time Library in my
application and I'm wondering how to use the SelectPrinter method of the
Report object.

The parameters are <Driver>,<Printer Name>,<Port> Simple enough, I've set
these to the printer I wish to use, but it doesn't make a blind bit of
difference.

The reason I ask is that certain reports from my application need to use a
Manesmann tally printer with wide paper, and others need to use standard A4.
It seems that Crystal just assumes that I want to use the A4 printer. I've
set the default printer to be the manesmann but still no avail. I've set the
default printer in the report to be the manesmann, still no change. I found
the SelectPrinter method but...nothing.

The only way I can see of doing it is calling the PrinterSetup method of the
Report object, but this pops up a dialog box for the user to complete, which
is not what I want (its supposed to be an automated print server with no
intervention from the user).

Any help would be greatly appreciated...

Cheers,
Dan Alexander



Mon, 14 Jul 2003 00:42:23 GMT  
 Using SelectPrinter
I've used code like the follwing and SelectPrinter() does work. However, it
doesn't report any error if it doesn't manage to select the printer, i.e. if
the printer name doesn't exist.

Ian.

    Dim rptStockList As New crStockList

    With rptStockList
        .DiscardSavedData
        .SelectPrinter "winspool", "NUL Printer 1", ""
        .Database.SetDataSource <an ADO recordset>
        .ReadRecords
        .PrintOut False
    End With


Quote:
> I'm using the Crystal Report 8 ActiveX Designer Run Time Library in my
> application and I'm wondering how to use the SelectPrinter method of the
> Report object.

> The parameters are <Driver>,<Printer Name>,<Port> Simple enough, I've set
> these to the printer I wish to use, but it doesn't make a blind bit of
> difference.

> The reason I ask is that certain reports from my application need to use a
> Manesmann tally printer with wide paper, and others need to use standard
A4.
> It seems that Crystal just assumes that I want to use the A4 printer. I've
> set the default printer to be the manesmann but still no avail. I've set
the
> default printer in the report to be the manesmann, still no change. I
found
> the SelectPrinter method but...nothing.

> The only way I can see of doing it is calling the PrinterSetup method of
the
> Report object, but this pops up a dialog box for the user to complete,
which
> is not what I want (its supposed to be an automated print server with no
> intervention from the user).

> Any help would be greatly appreciated...

> Cheers,
> Dan Alexander



Mon, 14 Jul 2003 18:16:07 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Very Helpful Tip (selectprinter error)

2. selectPrinter

3. CR SelectPrinter and Cancel

4. Using types in a different assembly given that the type may be used or not used

5. Using a main form to control the edit properties of a subform using VBA

6. Using a defined Variable to Update a Table using DoCmd.RunSQL

7. Using VBA to develop DBase file using Excel

8. Using NewMail events using .NET ?

9. Send/Receive using VB using View Control Object

10. Presenting the outlook mailitems in VB 6.0 using using xml schemas

11. Custom Graph Control using PictureBox using VB.NET

12. Problem using datatable.select using multiple columns

 

 
Powered by phpBB® Forum Software