Link to home
Start Free TrialLog in
Avatar of BirdsOfFire1
BirdsOfFire1

asked on

Unloading the CRViewer if user presses the Cancel Button

I am using Crystal Reports 8.5 with VB6.0 Windows 2000 operating system.

How do trap the Cancel Button on dialog print box?  When user presses the the cancel button, the report continues to print. I am using the code:

 UseDefault = False
 Report.PrinterSetup Me.hwnd
 Report.PrintOut True

I also understand that setting the "Report.Printout" to "False" will bring up another print box that will cancel the process.  That works. But, displaying the second print box to the customer is unprofessional.


Appreciates, and thanks.

BirdsOfFire

 
Avatar of DRRYAN3
DRRYAN3

As far as I can tell, there is no way to determine which button the user pressed on this dialog box.  If you read the comments in the printer controls sample for this procedure,

Call the Printer Setup dialog.  This dialog does not reflect changes that you may have made via the PaperSource, PrinterDuplex and PaperSize methods, since this method changes the **Printer Settings**, not the **Report Printer Settings**.  The two sets of methods are independent and are intended for use in different situations.

Which printer settings are you trying to let the user change by presenting this dialog box?

DRRYAN3
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial