I am using crystal reports 2008.
I am receiving the following error: A variable type (for example, 'numberVar') is missing.
I am using the following code for mailing addresses.
Shared shr_addr_1 As String
Shared shr_addr_2 As String
Shared shr_addr_3 As String
Shared shr_city As String
Shared shr_state_cde As String
Shared shr_postal_cde As String
Dim strFullAddress As String
strFullAddress =""
If shr_addr_1 <> "" Then
strFullAddress = strFullAddress + shr_addr_1
End If
If shr_addr_2 <> "" Then
strFullAddress = strFullAddress + Chr(13) + shr_addr_2
End If
If shr_addr_3 <> "" Then
strFullAddress = strFullAddress + Chr(13) + shr_addr_3
End If
If shr_city <> "" AND shr_State_cde = "" AND shr_Postal_cde = "" Then
strFullAddress = strFullAddress + Chr(13) + shr_city
elseif shr_city <> "" Or shr_State_cde <> "" Or shr_Postal_cde <> "" Then
Dim strPostalCode As String
If shr_Postal_cde <> "" Then
'format Postal code
'if {customer_address.country_cde} = "USA" then
if (Mid (shr_Postal_cde, 6, 4) = "") then
strPostalCode = Left (shr_Postal_cde, 5) '+ "-" + "0000"
else
strPostalCode = Left (shr_Postal_cde, 5) + "-" + Mid (shr_Postal_cde, 6, 4)
End If
'else if {customer_address.country_cde} = "CAN" then
' strReturn := Left ({customer_address.postal_cde}, 6);
End If
strFullAddress = strFullAddress + Chr(13) + shr_city + ", " + shr_State_cde + " " + strPostalCode
End If
formula = strFullAddress
Any ideas?
Bruce D.
I am receiving the following error: A variable type (for example, 'numberVar') is missing.
I am using the following code for mailing addresses.
Shared shr_addr_1 As String
Shared shr_addr_2 As String
Shared shr_addr_3 As String
Shared shr_city As String
Shared shr_state_cde As String
Shared shr_postal_cde As String
Dim strFullAddress As String
strFullAddress =""
If shr_addr_1 <> "" Then
strFullAddress = strFullAddress + shr_addr_1
End If
If shr_addr_2 <> "" Then
strFullAddress = strFullAddress + Chr(13) + shr_addr_2
End If
If shr_addr_3 <> "" Then
strFullAddress = strFullAddress + Chr(13) + shr_addr_3
End If
If shr_city <> "" AND shr_State_cde = "" AND shr_Postal_cde = "" Then
strFullAddress = strFullAddress + Chr(13) + shr_city
elseif shr_city <> "" Or shr_State_cde <> "" Or shr_Postal_cde <> "" Then
Dim strPostalCode As String
If shr_Postal_cde <> "" Then
'format Postal code
'if {customer_address.country_cde} = "USA" then
if (Mid (shr_Postal_cde, 6, 4) = "") then
strPostalCode = Left (shr_Postal_cde, 5) '+ "-" + "0000"
else
strPostalCode = Left (shr_Postal_cde, 5) + "-" + Mid (shr_Postal_cde, 6, 4)
End If
'else if {customer_address.country_cde} = "CAN" then
' strReturn := Left ({customer_address.postal_cde}, 6);
End If
strFullAddress = strFullAddress + Chr(13) + shr_city + ", " + shr_State_cde + " " + strPostalCode
End If
formula = strFullAddress
Any ideas?
Bruce D.