Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pre-printed forms - too much text
Message
De
16/02/2004 14:59:24
Guy Pardoe
Pardoe Development Corporation
Peterborough, New Hampshire, États-Unis
 
 
À
13/02/2004 16:57:30
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00877213
Message ID:
00877742
Vues:
16
Thanks Hilmar,

I'll play around with this idea...

Guy


>I thought you wanted to cut-off when there was too much text, but now I see you want to split it up.
>
>For a quick-and-dirty solution, with a fixed-width font, see memlines(), mline() and set memowidth. SET MEMOWIDTH should allow you to specify a width (in characters), memlines() should give you the number of lines, and mline(number) should help you extract individual lines.
>
>For a variable-width font, it is a little more complicated; I think you must check the Txtwidth() function, or something similar.
>
>>I understand that. But let's say that on an 8.5 X 11 inch piece of paper, I have a section in the middle of the page that's three inches tall for a narrative section. But there is other stuff on the page below the narrative section that must be printed. So I cannot just set the memo area to expand as necessary. Of course I can have less than 3 inches of text print in the form, but I cannot exceed that 3 inches if the user enters two pages worth of text.
>>
>>What I have to do is figure out how much text will fit in the designated 3 inches, and then take the rest and output it on one or more subsequent pages. I can't just do a word count or a character count and arbitrarily creating the breaking point. The user could have entered only a modest amount of words but many carriage returns (or other problems I haven't thought of).
>>
>>The problem in its simple form is this: How can I determine how much loose text can fit (print) into a designated rectangle without breaking up a word?
>>
>>I'm just wondering if there's code around that does something like this already so I can avoid writing it from scratch.
>>
>>
>>Thanks,
>>Guy
>>
>>
>>
>>
>>>You can use a standard report for printing. Somewhere in the report objects, there is an option for using either a fixed height, or to expand according to contents. This latter is what you have to avoid.
>>>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform