My additional function never appear in the Additional Functions List of the Formula Editor

Hi,

I'm using Crystal Report for Crystal Reports for Visual Studio .NET through VB.Net
I'm trying to add an additional function to the Formula Editor of Crystal Report.

So, I created a new VB.Net project (a class library) and write the code. Then I compiled and get a u2ln2l.dll (the name of my project).
In order to appear in the "additional functions" of the Formula Editor, the DLL seems to be in the C:\Program Files\Common Files\Crystal Decisions\1.0\Bin. So I put my DLL in this directory.

But my additional functions never appears in the Additional functions list of the Formula editor.

Any idea ?

Thanks,

Didier RENSONNET
rensonnetAsked:
Who is Participating?
 
mlmccCommented:
There is a built-in function in Crystal to do that.  I am not sure what the result would be if you had a French version of windows and Crystal - TOWORDS

Have you tried that function?

mlmcc
0
 
ebolekCommented:
http://support.businessobjects.com/library/kbase/articles/c2001050.asp

The article explains that in the ufl returned type should be Integer, Long, Single, Double, Currency, Date, Boolean, String.

Check if the returned type is different.

Regards
Emre
0
 
ebolekCommented:
is it windows or web project because ufl is not available for web projects

Regards
Emre
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

 
frodomanCommented:
The problem is very simple - the version of Crystal that comes with Visual Studio does not (ironically) support UFL's that have been created with a .Net language.  You'll need to use a non-.Net language (such as VB6) to create the UFL.  Once created then you can use it in Crystal.

The documentation that supports what I've said is here: http://support.businessobjects.com/library/kbase/articles/c2011789.asp

frodoman
0
 
mlmccCommented:
0
 
rensonnetAuthor Commented:
OK,

I did exactly what I found in this article :
http://support.businessobjects.com/library/kbase/articles/c2011789.asp

And I created my DLL exactly as I described in this article :
http://support.businessobjects.com/communityCS/TechnicalPapers/scr_user_defined_functions.pdf.asp

I named my dll : crufln2l.dll, put it in the C:\Program Files\Common Files\Crystal Decisions\1.0\Bin folder where other DLL seems to be, register it, restart Visual Studio .Net, open a Crystal Report BUT still my additional function is not in the list !!!

Is there a probleme with the name of the DLL (as I'm using Crystal Report for Visual Studio.Net) ?
All other DLL in the C:\Program Files\Common Files\Crystal Decisions\1.0\Bin start with "u2lxxxx.dll" but the article http://support.businessobjects.com/communityCS/TechnicalPapers/scr_user_defined_functions.pdf.asp said to name it starting with "cruflxxx.dll" !

Any idea ?

Didier Rensonnet
0
 
frodomanCommented:
Do you have a folder named C:\Program Files...\2.0\... ?   Depending on your version you may have to put them in 2.0 folder to be recognized (only if this folder already exists - if it doesn't then don't bother creating it because that won't help).

frodoman
0
 
mlmccCommented:
Try naming it u2xxxx but i berlieve that is for Crystal functions.

Is the dll registered?

mlmcc
0
 
rensonnetAuthor Commented:
Hi again,

To answer yours questions :
- I don't have any C:\Program Files...\2.0\... folder.
- The function included in my DLL return a string.
- I recompile my DLL using VB5 with the name u2ln2l.dll and registered it using regsvr32.exe. But my additionnal function is still no there

Any other idea ?

Didier RENSONNET
0
 
frodomanCommented:
When you created the UFL did you define the function as PUBLIC ?
0
 
rensonnetAuthor Commented:
Yes. My function is public.

Public function ConvertNumber2Letter(param1 as strin, param2 as string, param3 as strin) as string

Didier RENSONNET
0
 
mlmccCommented:
What is the function trying to do?

mlmcc
0
 
rensonnetAuthor Commented:
I'm trying to convert a number to letters in french !!!

Example :

"2 304,75"
becomes
"deux milles trois cents quatre euros et septante cinq centimes"

I have the code (more or less 500 lines) in VB but I want to use it in Crystal report.

Didier RENSONNET
0
 
frodomanCommented:
Most likely you could use the same code in a formula w/in Crystal - but of course that's a workaround not a solution.

I'm still thinking & digging because I can't think of a reason why it wouldn't be appearing...
0
 
rensonnetAuthor Commented:
Hi,

I tried the "TOWORDS" function but it seems to be only in english and thsi function is quite difficult to use in order to convert a number to letters.

I found this article this article explaining how to do this in english :
http://support.businessobjects.com/library/kbase/articles/c2005712.asp

So anybody understanding why my DLL doesn't appear in the additional function of the Formula Editor ?

Didier RENSONNET
0
 
mlmccCommented:
I don't understand.  I know I had similar problems at first because I didn't know about the naming convention and where to put it but after I learned that it just appeared after I put it in the correct place and registered it.

Is the function quite long?  Could you use it as formula code in the report?

mlmcc
0
 
rensonnetAuthor Commented:
No I can't use it in the code of the report because the public function calls other private functions ... and this is not possible with the Formula Edito I think.

Didier RENSONNET
0
 
frodomanCommented:
I can't explain it - there were a few issues we've pointed out that you've fixed but as far as I can tell you've got everything correct now.  Have you applied the service packs for CR.Net?  If not perhaps you should give that a try ( http://support.businessobjects.com/fix/hot/si75/default.asp?ref=default.asp_wwwjump#Crystal%20Reports%20Service%20Packs ).

I'm not aware of a specific fix there but the SP can't hurt at least...

frodoman
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.