Can anyone help me to solve this error
Can anyone help me solve following problem
I have developed an application in Visual Basic (ver 6.0) and Crystal Reports (9.2) for reports.
I can print report only once !
Let me explain this
Suppose from Menu I viewed and printed a report.
I existed from this back to menu and printed the same.. I will get error
Visual Basic Encountered a problem need to close. We are sorry for inconvinience
If you were in middle of something, the information you were woring on migt be lost
Please tell Micrsoft about this problem
If I choose to close the windo by saying "Don't send"
I get error
The instruction at 0x3b06aebb referenced memory at "x09a59cbc". The momory could not be "read"
Click on OK to terminate program
There is only one button "OK"
Hence you have no choise other than terminating the program
Code I use to print view and then print report
Dim mireport As CRAXDDRT.Report
Dim miCRApp As New CRAXDDRT.Application
'Dim mireport As ParameterFieldDefinitions
Dim CRXParamDefs As CRAXDRT.ParameterFieldDefinitions
Dim CRXParamDef As CRAXDRT.ParameterFieldDefinition
Set mireport = miCRApp.OpenReport(App.Path & "\bankmst.rpt")
mireport.EnableParameterPrompting = False
With CRViewer
.ReportSource = mireport
.ViewReport
While .IsBusy
DoEvents
Wend
.Zoom "90"
.Visible = True
End With
Set miCRApp = Nothing
Set mireport = Nothing
|