Problems with printing using Crystal Reports

Problems with printing using Crystal Reports

Post by David Nicol » Fri, 15 Nov 1996 04:00:00



I use VB 4.0 16 bit, Crystal Reports 3.0.1.32.
I have a print routine set up that prints a crystal report to the
printer. On the machine that I develop I can print out fine, however
on the machine that I install the software on nothing happens.
I use the code :

    If PEOpenEngine() Then
        PrintJobHandle = PEOpenPrintJob("order.rpt")
        If PrintJobHandle Then
            If PEOutputToPrinter(PrintJobHandle, 1) Then
                If PESetSelectionFormula(PrintJobHandle,
"{Orders.OrderNo} = " & PrevOrderNo) Then
                    If PEStartPrintJob(PrintJobHandle, 1) Then
                        PEClosePrintJob PrintJobHandle
                        PECloseEngine
                    Else
                        'can't start print job

The problem is with PEStartPrintJob which returns false. It returns true
on the developing machine and prints off the report. Both machines are
networked and linked to the same printer. Is there anybody
who can help me here. Am I missing some dll's. Thanks in advance,

Dave.

--

David Nicoll
Analyst/Programmer
Imajica.
10 Queens Rd,
Aberdeen. AB15 4ZT.

p : 01224 634342
f : 01224 634344

w : http://www.imajica.co.uk

 
 
 

Problems with printing using Crystal Reports

Post by David Nicol » Fri, 15 Nov 1996 04:00:00


In connection with my first posting I am trying to set the printer
explicitly to the default printer using PEOutputToDefaultPrinter
which is superseded by PEOutputToPrinter. Details on how to declare
PEOutputToPrinter are given but not PEOutputToDefaultPrinter. Does
anyone know the details for declaring PEOutputToDefaultPrinter. If
you do then please let me know as it may help me solve my problem.
Cheers,

Dave.

--

David Nicoll
Analyst/Programmer
Imajica.
10 Queens Rd,
Aberdeen. AB15 4ZT.

p : 01224 634342
f : 01224 634344

w : http://www.imajica.co.uk

 
 
 

Problems with printing using Crystal Reports

Post by Helmut Ke » Fri, 15 Nov 1996 04:00:00


I have the feeling you are running into path problems..

 
 
 

Problems with printing using Crystal Reports

Post by Brian & Tara Don » Sat, 16 Nov 1996 04:00:00



> In connection with my first posting I am trying to set the printer
> explicitly to the default printer using PEOutputToDefaultPrinter
> which is superseded by PEOutputToPrinter. Details on how to declare
> PEOutputToPrinter are given but not PEOutputToDefaultPrinter. Does
> anyone know the details for declaring PEOutputToDefaultPrinter. If
> you do then please let me know as it may help me solve my problem.
> Cheers,

> Dave.

> --

> David Nicoll
> Analyst/Programmer
> Imajica.
> 10 Queens Rd,
> Aberdeen. AB15 4ZT.

> p : 01224 634342
> f : 01224 634344

> w : http://www.imajica.co.uk

PEOutputToDefaultPrinter is an old call from Crystal Reports 2.0.  This
was replaced by PEOutputToPrinter and PESelectPrinter.  The only way to
set the report to the default printer is to make sure Default Printer is
selected inside the report.