vb6 sytem crashing when i try to print crystal reports
the visual basi 6 system i am using crashes when i attempt to print. this is the code that i am using
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 have also attached a copy of the system iam working with
Re: vb6 sytem crashing when i try to print crystal reports
I can't open the project because are so many references I don't have but I recognized a bunch of the Crystal dlls. But also there is a reference to CrViewer.dll for .Net framework. Maybe that's OK but it seemed suspicious to me in a VB 6.0 project.
Re: vb6 sytem crashing when i try to print crystal reports
the list of the refferences i am using, i've attached them. i am using vb6(sp6). crystal reports 11 and windows 7 proffessional. By the way crviewer is the name ofmy crystalreportviewer control
Last edited by tendaimare; Mar 30th, 2012 at 07:53 AM.
Re: vb6 sytem crashing when i try to print crystal reports
Do you actually need all of those references?
I doubt it as many of them are separate parts of the same thing as others (and you generally only need one of the group), and some of them are direct competitors to others.
I recommend unticking the ones you don't need (if in doubt try all of them, as VB wont let you remove ones you need), as not only will it make it easier for others to help, it is also likely to reduce issues for you - possibly including the one you created this thread for.