Solved

Unloading the CRViewer if user presses the Cancel Button

Posted on 2001-08-07
2
419 Views
Last Modified: 2012-06-21
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

 
0
Comment
Question by:BirdsOfFire1
[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
2 Comments
 
LVL 12

Expert Comment

by:DRRYAN3
ID: 6360308
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
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 75 total points
ID: 6386155
I found I had to create my own print setup form.  I created a simple one tha tallows the user to change some of the options.  It has a cancel button and I can tell which button was pressed.  I'm sure you could make a form that has all the options of the standard printer control form but I didn't see the real need.

If you would like to see the form and the code I can email it to you.

good luck
mlmcc

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone 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

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

739 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