Run time error '7002'

hi i'm using active report and the report is working properly unless i Make a dll of the Report Class and import it in the component service i started getting this error:
Run Time error '7002
'Application-defined or Object-defined error'.
Any Help ???
mirghaniAsked:
Who is Participating?
 
VBMeeraCommented:
hello,
if ur calling dll using New object try with CreateObject,
may it will solves ur problem.
Thnaks
0
 
mirghaniAuthor Commented:
here is my Report Dll Code:
Option Explicit

Public Function GetReport(ByVal iReport As Integer) As Object
Dim rpt As Object

    On Error GoTo ehGetReport
    Select Case iReport
    Case 1:
        Set rpt = New TempTripsReport
    Case 2:
        Set rpt = New CandReport
    Case Else
        Set rpt = Nothing
    End Select
   
exGetReport:
    Set GetReport = rpt
    Exit Function
   
ehGetReport:
    Debug.Print Err.Description
    Set rpt = Nothing
    Resume exGetReport
End Function

the following is the .dsr in the same Dll
TempTripsReport
CandReport
and the following is the Client Code:

Dim MyCls As MyRep_Prj.MyClsReportManager
Set MyCls = New MyRep_Prj.MyClsReportManager
Dim MyRepObj As Object
Set MyRepObj = MyCls.GetReport(2)
Set frmarv.arv.ReportSource = MyRepObj
frmarv.Show 1
Set MyCls = Nothing
Set MyRepObj = Nothing
 then the '7002' error raise.
0
 
VBMeeraCommented:
hi,
would u plz tell me by debuging at what line it's giving error in ur above code?
0
 
mirghaniAuthor Commented:
hi,
actually it's a dll so i can't recognize at which line the error occur and if i copy and paste the code in a Class in an EXE it works fine:-(
Regards.
0
 
mirghaniAuthor Commented:
Sorry for Delay:-)
Meer.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.