Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Formula help
Message
 
À
09/11/2007 18:22:04
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
Information générale
Forum:
Crystal Reports
Catégorie:
Formules et fonctions
Titre:
Versions des environnements
Crystal Reports:
Crystal Reports XI
Divers
Thread ID:
01268151
Message ID:
01268197
Vues:
18
This message has been marked as the solution to the initial question of the thread.
don't you need a ; at the end of the first IF?


>I am trying to create a formula to format a phone number and append an extension if it exists. Here is my formula:
>
>
>stringVar result;
>IF Length ({rptDealerSummaryReport.BusinessPhone}) = 10 Then
>result := Mid ({rptDealerSummaryReport.BusinessPhone}, 1, 3) + "-" + Mid ({rptDealerSummaryReport.BusinessPhone}, 4, 3) + "-" + Mid ({rptDealerSummaryReport.BusinessPhone}, 8)
>Else
>result := {rptDealerSummaryReport.BusinessPhone}
>
>IF Length({rptDealerSummaryReport.BusinessExt}) > 0 Then
>result := result + " x" + {rptDealerSummaryReport.BusinessExt}
>
>
>I get this error before it hits the second IF statement: "The remaining text does not appear to be part of the formula."
>
>It's like it doesn't realize I want two separate IF statements. What am I doing wrong?
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform