Crystal Decisions Windows Forms CrystalReportViewer UFL Registration

I am migrating a legacy VB6 app which heavily uses Crystal Reports into a Visual Studio 2013 VB app. The current report designer is CR 11.5.11.1470. I am using the Crystal Decisions Windows Forms CrystalReportViewer control (SAP Crystal Reports 13.0.13) to view these reports which works just fine, except for reports that have made use of User defined Functions written into the standard u2lcom.dll which had been written by our programmers years ago. The designer sees the old VB6 CRUFL functions normally, but the WinForms Report Viewer doesn't and complains that "UFL 'u2lcom.dll' that implements this function is missing."

Now I do understand that the old VB6 UFL should be migrated into a VS 2013 Class Library project which I have done. I have researched this problem and tried all the suggestions to no avail. I have tried numerous things such as compiling the migrated UFL functions into a 32-bit .NET DLL project and copying that to c:\Windows\SysWOW64 and into C:\Program Files (x86)\Business Objects\Common\3.5\bin, and also 64-bit versions of the project.

Could someone please assist me by telling me how to
(a) Compile and install the VS 2013 Class Library project DLL for the designer to see and use
)b) Compile and install the VS 2013 Class Library  project DLL for the WinForms Report Viewer to see and use

Any assistance would be greatly appreciated.
cwruckAsked:
Who is Participating?
 
vastoCommented:
64 bit applications cannot use COM objects. So ther eis no point to place it in SysWOW64. Check this tutorial how to create UFL in .NET: https://msdn.microsoft.com/en-us/library/ms227603(v=VS.90).aspx
0
 
vastoCommented:
I don't think it is necessary to rewrite the DLL. You need just to register it. Did you register the original DLL using regsvr32.exe ? You need to use the one in c:\Windows\SysWOW64

try to run this command in CMD ( you need to run CMD as administrator - this is very important)
c:\Windows\SysWOW64\regsvr32.exe  "path to the UFL dll"
0
 
cwruckAuthor Commented:
Thanks for your suggestion. I have tried that, but still get the same message in the report viewer that the dll that implements the function is missing.
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

 
vastoCommented:
You need to compile your .NET viewer application (the one you are migrating) explicitly as 32 bit application. If it is compiled as AnyCPU it will behave like 64 bits app and will not e able to use COM objects.

What is so special for this viewer, why do you need to rewrite it instead of using an existing one ?
0
 
cwruckAuthor Commented:
I need our new app to run as a 64-bit app...

I'm not trying to rewrite the viewer, I'm just trying to get the Crystal Report Viewer to use our UFL.
0
 
cwruckAuthor Commented:
Unfortunately I cannot get this to work in a 64-bit application environment so we are removing all requirements for UFLs from our reports during our migration process. Thanks to vasto for your assistance, but unfortunately it appears as if there is no solution.
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.