SAP Knowledge Base Article - Public

1689447 - COM User Function Library (UFL) hangs .NET application when closing the ReportDocument instance.

Symptom

  • COM User Function Library (UFL) hangs .NET application when closing the ReportDocument instance.

Environment

Environment:

  • Crystal Reports For visual studio 2010
  • .NET FRAMEWORK 4.0

Reproducing the Issue

To reproduce the issue:

A)    First create and registered a COM UFL:

1- Create for instance a dll named CRUFLCR11Hangs.dll in VB6 with the following code:

Option Explicit

Public UFPrefixFunctions As Boolean

Public Function HelloWorld() As String

End Function 

2- Then Compile and register the dll.

B)    Then run the following .NET snippet code through Crystal Reports For Visual Studio 2010:

ReportDocument rpt = new ReportDocument();

            rpt.Load(@"c:\test\TestPrint\TestPrint\myRpt.rpt");

            rpt.Close();

            rpt.Dispose();

And you will notice that the .NET application will hang when calling the Close method on the instance of the ReportDocument.

For more information about the SDK, refer to the following (see References area):

  • DevLibrary

Cause

  • This is caused by a conflict between the COM UFL .dll and the .NET assemblies.

Resolution

  • To work around the issue, unregister the com UFL .dll.
  • It is not recommended to have some COM UFL .dll on a .NET environment.

Keywords

com ufl hangs .net application when closing the reportdocument instance; com ufl hangs .net application; ufl; .net application hangs. , KBA , BI-DEV-NET , BI Software Development Kits (SDKs) - .NET or Other , BI-DEV , Business Intelligence Software Development Kits (SDKs) , Problem

Product

SAP Crystal Reports, developer version for Microsoft Visual Studio