Solved

Unloading the CRViewer if user presses the Cancel Button

Posted on 2001-08-07
2
404 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
2 Comments
 
LVL 12

Expert Comment

by:DRRYAN3
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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 …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

763 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now