Hi,
I am really new to crystal reports and am recreating my access reports as crystal reports. My access reports utilize a few functions and I have created a UFL project to duplicate the functionality. While creating the UFL, I ran into the problem of not being able to see the additional functions I created when I use objects as parameter types. Does anyone know why this might be? and if I could get some suggestions on maybe how to change the code to support this problem? Need to use objects because the database will containt null or blank values. thank you.
I am really new to crystal reports and am recreating my access reports as crystal reports. My access reports utilize a few functions and I have created a UFL project to duplicate the functionality. While creating the UFL, I ran into the problem of not being able to see the additional functions I created when I use objects as parameter types. Does anyone know why this might be? and if I could get some suggestions on maybe how to change the code to support this problem? Need to use objects because the database will containt null or blank values. thank you.
Code:
Public Function formatDimensions(ByVal comActLength As Object, ByVal comActWidth As Object, ByVal comActHeight As Object, ByVal isMetric As Boolean) As String Implements IExchangeUfl.formatDimensions
Dim str As String
str = ""
If Not (CType(comActWidth, Double) = 0 Or comActWidth = "") Then
If (CType(comActLength, Double) = 0 Or comActLength = "" Or IsNothing(comActLength)) Or _
(CType(comActHeight, Double) = 0 Or comActHeight = "" Or IsNothing(comActHeight)) Then
If (isMetric = True) Then
str = String.Concat(str, FormatNumber(comActWidth, 2), "Diameter x")
Else
str = String.Concat(str, ConvertMetricToImperial(comActWidth, False), "Diameter x")
End If
str = String.Concat(str, IIf(IsNothing(formatLength(comActLength, isMetric)) = True Or formatLength(comActLength, isMetric) = "", "", String.Concat(formatLength(comActLength, isMetric), ("L"))))
str = String.Concat(str, IIf(IsNothing(formatHeight(comActHeight, isMetric)) = True Or formatHeight(comActHeight, isMetric) = "", "", String.Concat(formatHeight(comActHeight, isMetric), ("H"))))
Else
str = String.Concat(str, IIf(IsNothing(formatLength(comActLength, isMetric)) = True Or formatLength(comActLength, isMetric) = "", "", String.Concat(formatLength(comActLength, isMetric), (" x"))))
str = String.Concat(str, IIf(IsNothing(formatWidth(comActWidth, isMetric)) = True Or formatWidth(comActWidth, isMetric) = "", "", String.Concat(formatWidth(comActWidth, isMetric), (" x"))))
str = String.Concat(str, IIf(IsNothing(formatHeight(comActHeight, isMetric)) = True Or formatHeight(comActHeight, isMetric) = "", "", String.Concat(formatHeight(comActHeight, isMetric))))
End If
End If
Return str
End Function