Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Memo field, justify and space
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00508574
Message ID:
00508578
Vues:
16
This message has been marked as a message which has helped to the initial question of the thread.
>Hi
>
>I'm working in a report with memo field.
>I need more space between lines and justify the text. How can I do that?
>
>TIA

Well, here it is one simple solution, which will insert one blank line between each memo line:
instead of MyMemo field put FormatMemo() UDF (don't forget to strach with overflow check)

From the top of my head:
function FormatMemo
local lcStr, lnPos, lcResult
lcStr=alltrim(MyMemo) && Assign to it your memo field
lnPos=1
do while len(m.lcStr)>=20 && Use the number of chars you want in your line:
   lcStr=substr(lcStr,m.lnPos,20)
   lcResult=m.lcStr+chr(13) && Insert a blank line
   lnPos=m.lnPos+20  
enddo
return lcResult
You can make it more fancy, if you don't want to break words. In this case you can divide it by words first, using FoxTools Word and WordNum, then see, how many words you can put in one 20 char string...
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform