Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Crystal events in visual basic 6.0

Status
Not open for further replies.

Fursten

Programmer
Dec 27, 2000
403
PT
Is it possible to use crystal reports events in VB6.0? If not, how can I put some code when an user close a crystal form (report)?

Sergio Oliveira
 
You don't mention what version of crystal reports you are using. If you are using version 8 you can use the RDC instead of the .ocx control. In VB's Project/Refrences menu option add refrences to 'Crystal Report 8 ActiveX Designer Run Time Library' and 'Crystal Report 8 ActiveX Designer Design Time Library' This will add the 'Add Crystal Report 8' option to the Project menu. Click this and say yes to adding a form containing the crystal report viewer control and no to making it the startup object. Then it will ask if you want to create a new report or choose an existing one. Browse for your report file and add it. Now when the user is done prieviewing/printing/exporting the report they will close the form that was added by crystal reports and you can use the form unload event. There are also many report specific events available. It is very simple to change from the ocx to the RDC and it is much more powerful. If this was not helpful please provide more specific information about your problem. Ruairi

Could your manufacturing facility benefit from real time process monitoring? Would you like your employees to be able to see up to the minute goal and actual production?
For innovative, low cost solutions check out my website.
 
I´m using Crystal Reports v.7. What I´m trying to do is to put some code in the close button of a crystal report. So when the user close it, it would make an action.

The only way I figure out it was by puting de crystal window inside a vb window. However it was better if I could do this directly from crystal events... However it seem that they are not compatible with VB 6.0

Is this true? Any ideas?

Sergio Oliveira
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top