Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UFL Error

Status
Not open for further replies.

eatwork

Technical User
May 16, 2005
155
0
0
CA
Hi, does anyone know what this error means and how I can resolve the issue? I have created a UFL for crystal reports in VS2005 and have created the assembly etc. It works fine in preview report, but when I load the program and try to load the report from the viewer it gives me the error:

"NonComVisibleBaseClass was detected
Message: A QueryInterface call was made requesting the default IDispatch interface of COM visible managed class 'CRUFL_VB_ReportFunctions.CrystalReport1'. However since this class does not have an explicit default interface and derives from non COM visible class 'CrystalDecisions.CrystalReports.Engine.ReportClass', the QueryInterface call will fail. This is done to prevent the non COM visible base class from being constrained by the COM versioning rules.
 
anyone?
if no one knows the answer to this questions, could someone help me with the creation of "custom functions"?

eg I want to convert 4 functions, but this one is the easiest, just looking for syntax etc. Thank you

Code:
 Public Function NZ(ByVal obj As Object, ByVal strRepl As Object) As String 'Implements IReportFunctionsUfl.NZ
        Try
            If obj Is DBNull.Value OrElse obj Is Nothing OrElse Convert.ToString(obj) = "" Then
                Return Convert.ToString(strRepl)
            Else
                Return Convert.ToString(obj)
            End If
        Catch err As Exception
            MsgBox(err.ToString)
            Return ""
        End Try
    End Function
 
Hi IdoMillet,
Thank you for your reply, do you know if there is anything comparable to object or the try catch block in crystal reports? Thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top