my vb6(sp6) crashes every time I try to print a crystal report .it actualluy prints the report but then closes soon afterwards listed below is the code that i am using. can anyone help me on what could be the cause of this I have googled all over the place on what could cause my system to crash but up to no i am still looking.
Code:
Dim Report As New CRAXDDRT.Report
Dim App As New CRAXDDRT.Application
Private Sub Command1_Click()
Set Report = App.OpenReport("C:\SBWBWIN\Report1.rpt")
Report.Database.Tables(1).Location = "C:\sbwbwin\NewDatabase.mdb"
CRViewer.ReportSource = Report
CRViewer.ViewReport
CRViewer.Zoom (100)
Screen.MousePointer = vbDefault
'CRViewer.PrintReport
Report.PrintOut False, nocopies
End Sub
i am using vb6(sp6). crystal reports 11 and windows 7 proffessional