Solved

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

Posted on 2004-10-18
21
305 Views
Last Modified: 2008-01-09
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
0
Comment
Question by:rensonnet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
  • 5
  • +1
21 Comments
 
LVL 10

Expert Comment

by:ebolek
ID: 12338839
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
 
LVL 10

Expert Comment

by:ebolek
ID: 12338848
is it windows or web project because ufl is not available for web projects

Regards
Emre
0
 
LVL 42

Expert Comment

by:frodoman
ID: 12338938
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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 101

Expert Comment

by:mlmcc
ID: 12339923
0
 

Author Comment

by:rensonnet
ID: 12345395
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
 
LVL 42

Expert Comment

by:frodoman
ID: 12346696
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
 
LVL 101

Expert Comment

by:mlmcc
ID: 12346757
Try naming it u2xxxx but i berlieve that is for Crystal functions.

Is the dll registered?

mlmcc
0
 

Author Comment

by:rensonnet
ID: 12347370
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
 
LVL 42

Expert Comment

by:frodoman
ID: 12347492
When you created the UFL did you define the function as PUBLIC ?
0
 

Author Comment

by:rensonnet
ID: 12347621
Yes. My function is public.

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

Didier RENSONNET
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 12348707
What is the function trying to do?

mlmcc
0
 

Author Comment

by:rensonnet
ID: 12348949
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
 
LVL 42

Expert Comment

by:frodoman
ID: 12349170
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
 
LVL 101

Accepted Solution

by:
mlmcc earned 125 total points
ID: 12354569
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
 

Author Comment

by:rensonnet
ID: 12370995
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
 
LVL 101

Expert Comment

by:mlmcc
ID: 12377419
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
 

Author Comment

by:rensonnet
ID: 12378912
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
 
LVL 42

Assisted Solution

by:frodoman
frodoman earned 125 total points
ID: 12380112
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

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question