Brighton
asked on
Additional Function not showing up.
Hi Experts
I have been trying to add my own User Defined Function to Crystal 8.5 with no success. I have compiled my VB code as a dll and placed this dll in the WINNT\Crystal directory and registered it. At this point I would expect it to be visible under 'Additonal Funtions' in Funtions in the Formula editor. We have been able to do this in verions 7 of Crystal but ever since we upgraded we have not been able to get it to work.
Here is my VB code. It is one I found off of Crystals web site.
Option Explicit
Public UFPrefixFunctions As Boolean
Private Sub Class_Initialize()
UFPrefixFunctions = False
End Sub
Public Function DateToString(date1 As Date) As String
DateToString = Format(date1, "Long Date")
End Function
Does anyone know what I am missing?
Thanks
I have been trying to add my own User Defined Function to Crystal 8.5 with no success. I have compiled my VB code as a dll and placed this dll in the WINNT\Crystal directory and registered it. At this point I would expect it to be visible under 'Additonal Funtions' in Funtions in the Formula editor. We have been able to do this in verions 7 of Crystal but ever since we upgraded we have not been able to get it to work.
Here is my VB code. It is one I found off of Crystals web site.
Option Explicit
Public UFPrefixFunctions As Boolean
Private Sub Class_Initialize()
UFPrefixFunctions = False
End Sub
Public Function DateToString(date1 As Date) As String
DateToString = Format(date1, "Long Date")
End Function
Does anyone know what I am missing?
Thanks
ASKER
Yes. The program listed above is compiled and registered as CRUFLTraining.DLL in my WINNT\Crystal directory.
What name are you looking for in the Additional Functions List.
CR renames your function. As a guess look for
TrainingDateToString
mlmcc
CR renames your function. As a guess look for
TrainingDateToString
mlmcc
ASKER
Yes, I was expecting to see TrainingDateToString or something with Training or even DateToString in the name.
I have looked at all the additonal functions and none of them are even close to what I was looking for.
I have looked at all the additonal functions and none of them are even close to what I was looking for.
I just created an ActiveX DLL using your code and compiled it in VB. I compiled it to my library directory (not windows\system) and CR recognized it immediately.
My first attempt didn't work (wouldn't compile) but when I started from a fresh project it did.
Suggest you create a new ActiveX dll project, add a class module, then type in your code and make the dll and see if it is rcognized.
mlmcc
My first attempt didn't work (wouldn't compile) but when I started from a fresh project it did.
Suggest you create a new ActiveX dll project, add a class module, then type in your code and make the dll and see if it is rcognized.
mlmcc
ASKER
I redid the DLL as you suggested but still no luck. Is there a reference that needs to be check in VB?
Thanks
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks! It appears to be case sensitive. Once I changed the project name to lowercase and recompiled it worked but that doesn't make sense. Why just changing the project name and nothing else make it work? Thanks Again.
mlmcc