Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Format display of zipcode problem
Message
De
28/03/2002 14:44:40
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00638566
Message ID:
00638610
Vues:
26
Thanks Jim, this is similar to what Sergey recommended and it works. I'm going to save your message in my favorites for future use! I find that not touching reports for awhile and then going back to them after some time has passed, I forget too much! I have to start looking at all of my other reports for examples...
Tracy

>>But Jim, this is a field on a report, not a form. Is there a way to do this to control the display of a zipcode (stored in the table like: 28314, 238934444, etc) in reports?
>
>Tracy,
>
>In that case I would either one of making the field expression;
>
>
>IIF(LEN(ALLTRIM(Zip))>5,TRANSFORM(Zip,"@R 99999-9999"),TRANSFORM(Zip,"99999"))
>
>
>Or preprocessing the data
>
>
>* Code that runs the report
>CREATE CURSOR MyRptCsr ;
>   ( Fld1 C(20), ;
>     ...,
>     Zip C(10))
>
>SELECT TheTableForTheData
>SCAN
>   APPEND BLANK IN MyRptCsr
>   IF LEN(ALLTRIM(Zip)) > 5
>      REPLACE Fld1 WITH TheTableForTheData.Something, ;
>              ...  WITH ..., ;
>              Zip  WITH TRANSFORM(TheTableForTheData.Zip,"@R 99999-9999")
>   ELSE
>      REPLACE Fld1 WITH TheTableForTheData.Something, ;
>              ...  WITH ..., ;
>              Zip  WITH TheTableForTheData.Zip
>   ENDIF
>ENDSCAN
>
>
>Then run the report using MyRptCsr
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform