Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Textmerge/memo wordwrap problems
Message
 
 
À
22/02/2003 10:48:43
Dick Day
Madison County, Nebraska
Nebraska, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00756562
Message ID:
00756759
Vues:
30
Dick,

This is a truly annoying bug, it's related to the interaction of MEMOWIDTH and textmerge and long strings. VFP is inserting a CRLF pair into the middle of your memo as it outputs it. I ran into this bug in the code that generates my website articles from the dbf datastore. The workaround I use is a function that writes the memo out in smaller chunks. I have memowidth set to something bigger than the 512 used in the code below.
* We need to chunk this out a little at a time here because otherwise just printing
* it as a memo SET MEMOWIDTH causes CRLF pairs to be inserted into the stream every
* MEMOWIDTH characters!

for i = 1 to len( lcData ) step 512
   \\<<substr( lcData, i, 512 )>>
endfor
>I am getting inconsistent wordwrapping when textmerging from a memo field to a text file. The memo contains the formletter text with the appropriate embedded memvars. Memvars are created prior to running the textmerge. The the that is created is perfect in every way except for the formatting.
>
>The program is not ignoring the memowidth parameter because if I reduce it, the length of each line of text outputted is less.
>
>If I have memowidth set to 80, there will always be some lines that end at about 45 characters and the first few words of the next line could have easily fit at the end of this line. It only happens when the line contains a <>, lines that are purely text with no variables wrap just fine.
>
>All text variables are alltrim()'d.
>
>Has anyone seen this before? Any suggestions?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform