Solved

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

Posted on 2004-10-18
21
298 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
  • 6
  • 5
  • 5
  • +1
21 Comments
 
LVL 10

Expert Comment

by:ebolek
Comment Utility
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
Comment Utility
is it windows or web project because ufl is not available for web projects

Regards
Emre
0
 
LVL 42

Expert Comment

by:frodoman
Comment Utility
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
 
LVL 100

Expert Comment

by:mlmcc
Comment Utility
0
 

Author Comment

by:rensonnet
Comment Utility
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
Comment Utility
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 100

Expert Comment

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

Is the dll registered?

mlmcc
0
 

Author Comment

by:rensonnet
Comment Utility
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
Comment Utility
When you created the UFL did you define the function as PUBLIC ?
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:rensonnet
Comment Utility
Yes. My function is public.

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

Didier RENSONNET
0
 
LVL 100

Expert Comment

by:mlmcc
Comment Utility
What is the function trying to do?

mlmcc
0
 

Author Comment

by:rensonnet
Comment Utility
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
Comment Utility
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 100

Accepted Solution

by:
mlmcc earned 125 total points
Comment Utility
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
Comment Utility
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 100

Expert Comment

by:mlmcc
Comment Utility
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
Comment Utility
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
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

771 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now