Solved

Unloading the CRViewer if user presses the Cancel Button

Posted on 2001-08-07
2
421 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 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

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…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

707 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