Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: What happens when the user clicks Cancel? Post Reply Post New Topic
Author Message
RobR
Newbie
Newbie


Joined: 24 Apr 2009
Location: United States
Online Status: Offline
Posts: 18
Quote RobR Replybullet Topic: What happens when the user clicks Cancel?
     Posted: 02 Jun 2009 at 5:53am

Greetings again!

Our application, written in MS Visual C++ 6, allows a user to display Crystal Reports reports. Our application creates a window to hold the report display, then tells the viewer control to use the client area of the new window, and then calls the CR viewer control's ViewReport() method. At that point, the viewer control and our main application run separately. If the report requires the user to select parameters, the viewer displays a dialog box for them. If the user clicks Cancel on that box, a little message box appears saying "User cancelled", and the viewer control doesn't do anything more. However, the original window still exists. The user would like that window to go away automatically.

I see that a report object can raise four different events, including a NoData event. Does that event get raised when the Cancel button is clicked?

I also see that the Crystal Reports object model includes a class named IReportEvent, and there are methods in that class related to the events a report object can raise.  However, to use that class, one must know how to implement a COM event sink.  I do not know how to do that.  Can anyone show me an example of how to implement an event handler for the NoData event in MS Visual C++ 6?
 
Thank you very much.
 
RobR


Edited by RobR - 02 Jun 2009 at 5:54am
Richardson's First Law of Computational Unpredictability: The fact that a given occurrence is impossible does not imply that it will not occur.
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum