ۥ-x@ -  j jj j j j j x  B   4@ y j Crystal Reports Technical Document Subject: GPF When closing an application window while still printing. Date: July 28, 1993 Versions: 2.0+ VBX Situation: Crystal Reports GPFs when the application is closed while a report is still being generated. To prevent the GPF, don't allow the user to close the application while the report is running. Closing the application once the report has finished running but is still on screen is not a problem. Solution: Here is an example of some VB code that does this... Sub Form_Load () ' Initial value of zero for the running report flag. Flag% = 0 End Sub Sub Form_QueryUnload (Cancel As Integer, UnloadMode As Integer) ' If the report is running don't allow a close down. If Flag% = 1 Then Cancel = True End Sub Sub Command1_Click () 'Set the flag. Label1.Caption = "Running....." Flag% = 1 Report1.Action = 1 Label1.Caption = "Not Running" 'Clear the flag. Flag% = 0 End Sub Remarks: This procedure should also be followed if using the print engine. GPFVBX.DOC $MXQ[  'KMX3l':FOQ[)B 0 0 BTimes New Roman Symbol&Arial5Courier New 1CouriervvvA"hF%eyGPF when closing while printingTechnical Support DocumentGPF close printAllan D. McMordie Gurdeep Birdi