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