cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Associate dll with custom formulas with crystal 2008 0 2020

0 Likes
1,270

Hello, good morning, I am testing the products since we want to migrate our reports to a more updated one and I would like to know if crystal 2008 or 2020 have the possibility of associating a custom dll that contains formulas and that can be used within the report, I would love it if it is possible have some example of how to associate said dll

Accepted Solutions (1)

Accepted Solutions (1)

DonWilliams
Active Contributor
0 Likes

Ah, you can't have bot 32 and 64 bit versions in the same folder, if that's what you are saying and doing.

Check this sample C++ and COM UFL KBA:

https://userapps.support.sap.com/sap/support/knowledge/en/1525014

It shows you how to GAC the UFL so your App can use it.

Also note how to add a crw64.exe.config file so CR uses the same framework your UFL is using, which should be 4.8

dom65
Discoverer
0 Likes

Hi Don,

I am using VS 2022 with Crystal 2020.

I have endeavoured to follow the instructions given in the referenced knowledge base article.

Everything appears to be ok until the final regasm step where I get the following error

Error.png

Any idea what I am be missing?

Thanks

Answers (8)

Answers (8)

0 Likes

Ok, Don, I'll put you in context, the custom dll was in COM, we converted it to x64, since the dll is ours, what I mean is that if we add new functions to this dll it doesn't take them crystal, but it will be What should I unregister the COM so that it only takes the x64 dll?

DonWilliams
Active Contributor
0 Likes

Not clear what changes you made, to the functions in the dll or ???

It is COM so you will need to unregister the old version and then reregister the new one.

Does not take the changes in CR Designer or in your project?

0 Likes

Ok, I already managed to get crystal to recognize the custom dll, but now what I see is that it does not take the changes made to this dll, despite the replacement of this dll in the path, any idea why? or if something needs to be done to refresh the dll?.

0 Likes

Good morning, I was trying what it says in the forums that you kindly put as an answer but I am still having problems so that Crystal Reports 2020 can read the formulas of my custom dll, I attach images in case you can detect if I am doing something wrong.

I had forgotten to tell you that this custom dll was previously Com and has already moved to x64.

path-dll.png

captura.png

DonWilliams
Active Contributor
0 Likes

Here is a sample UFL written in Visual Studio KBA:

Userapps.support.sap.com

https://userapps.support.sap.com/sap/support/knowledge/en/1525014

1525014 - Sample C# .NET UFL and Localization Formula functi...

To change the Class Name so the function name (DotNetSampleClass) is not listed in Crystal Report Designer do the following: Click on the View menu in .NET IDE ...

Userapps.support.sap.com

https://userapps.support.sap.com/sap/support/knowledge/en/1266912

How to deploy Crystal Reports UFL created in Visual Studio ....

1603381 - How to create a C++ UFL using the new Unicode UFL interface in Crystal Reports 2008 & later. 1525014 - Sample C# .NET UFL and Localization Formula ...

You will need someone who can write your UFL code in .NET.

0 Likes

Ok, that's good news, do you know what the steps are to associate a custom dll or do you have a practical example to replicate?

DellSC
Active Contributor
0 Likes

The problem you're going to run into is that Crystal 2008 is 32-bit and Crystal 2020 is 64-bit. Crystal 2020 cannot connect to 32-bit .dll files. So, if the .dll is a third-party tool, you'll have to get the 64-bit version of it. If it is something that was created in-house, it will need to be upgraded to 64-bit.

-Dell

ido_millet
Active Contributor
0 Likes

Yes, this is known as User Function Library (UFL).
You can create your own dll or use a 3rd-party UFL that matched your requirements.
Ken Hamady maintains a listing of 3rd-party UFLs here.