Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dynamically sent font size when running
Message
De
11/12/2013 23:00:26
 
 
À
11/12/2013 16:47:42
Al Doman (En ligne)
M3 Enterprises Inc.
North Vancouver, Colombie Britannique, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01589955
Message ID:
01589978
Vues:
49
>>As noted in an earlier thread, I have this avid interest in printing using a very large font.
>>
>>(Hacking the FRX allowed me to use a fontsize of 185 with no problem).
>>
>>Now I have a follow on problem: using such a large font size severely limits the number of characters I can print (about 7). In some circumstances, I will printing a few more characters than that.
>>
>>Meaning that when the report is running, I will want to dynamically change the font size for this one control.
>>
>>Is there some way to achieve this?
>
>One workaround would be to have 4 different reports, each with manually set font sizes for:
>
>Chars07.frx (up to 7 characters)
>Chars08.frx
>Chars09.frx
>Chars10.frx
>
>Update: on re-reading you might be saying you want to change the control font size during the actual run of the REPORT FORM command, generating a multi-page printed report. I don't know how you could do that. Another workaround would be to run the report one row at a time i.e. REPORT FORM ... NEXT 1, and for each report/page pick the appropriate CharsXX.frx
>
>Another approach might be to define reports based on font size e.g.
>
>Font185.frx
>Font175.frx
>Font165.frx etc.
>
>Then, when running a one-page-at-a-time report generation loop, use TXTWIDTH() to determine the width of the string you want to print, testing your various font sizes until you get the closest fit.

Al -- thanks for all the suggestions.

I came up with a hybrid approach mentioned to me by Matt Slay.

It turns out that more than 99% of my records can use the largest font. So I simply overlayed this one control with a second control with a smaller font size that handles the remaining records.

And then I used PrintWhen to determine which control appears.

(This always prints a single page at a time, so there is no problem with multiple pages)
Jim Nelson
Newbury Park, CA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform