|
I had a crystal report which I would like to insert a row in database when users print the report.
I tried to use the CRAXDRT.Report.PrintOutEx in VB6 code to trigger the print action. However, user may cancel the printing process by clicking the cancel button of printing dialog box. I want to insert a row only if user confirm the printing by clicking the OK button in printing dialog. Is there a possible a way to get the result whether user click the OK button or Cancel button?
Besides the method above, I'm also thinking of another way, which is to put the insert coding in a stored procedure. The stored procedure will also return the data to crystal report to display the data. Thus, the crystal report will using this stored procedure to insert a row and retrieve the data the report requires. However, I think the stored procedure will be get called whether users is viewing the report only or print the report. I want to insert a row only if users print the report (not view the report). So, is it possible to detect the preview action or print action in the crystal report itself?
Any suggestions are welcomed.
|