Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Unloading the CRViewer if user presses the Cancel Button

Posted on 2001-08-07
2
Medium Priority
?
429 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 101

Accepted Solution

by:
mlmcc earned 225 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

636 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