Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing font in Memo field base on substr(chgline,1,7)=
Message
 
À
06/04/2005 09:26:04
Marcel Roy
South West Direct
Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01001871
Message ID:
01002046
Vues:
19
Marcel,

Not be controversial, but I think it's possibe to do what you want with a different approach. The method is as follows:

VFP report designer allows to set different font setting for different report controls, therefore split the display of your memo field into three text controls. Use the following settings in each control:
Control1:
Expression:GETWORDNUM(MyMemoField,1,CHR(13))
Font: bold
Comments: && This gets first line
Control2:
Expression: SUBSTR(MyMemoField, ;
ATC(CHR(13),MyMemoField,1)+1, ;
ATC(CHR(13),MyMemoField, ;
OCCURS(CHR(13),MyMemoField))-ATC(CHR(13), ;
MyMemoField,1))
Comments: && This gets middle line
Font: Normal
Feild Position: Float
Strech with Overflow: Yes
Control3:
Expression:GETWORDNUM(MyMemoField,GETWORDcount(MyMemoField,chr(13)),CHR(13))
Comments: && This gets last line
Font: bold
Feild Position: Float

This has been tested and works for me.


>I will like to know if it possible to change font on a specific line of a memo field in the details lines of my report?
>Ex:
> the first and last lines in bold
>
>Service From 12/15/2004 01/18/2005
>Customer Charge 15.00
>Demand Charge (at $5.00/KW) 101.90
>Energy Charge (at $0.0486/KWH) 84.18
>Power Cost Adj. (1,732 KWH at $0.0102) 17.67
>Summary of Electric Billing Charges 218.75
>Gross Receipts Tax 5.61
>State Sales Tax 15.71
>Current Charge Subtotal 240.07
Dawa Tsering


"Do not let any unwholesome talk come out of your mouths,
but only what is helpful for building others up according to their needs,
that it may benefit those who listen."

- Ephesians 4:29-30 NIV

Dare to Question -- Care to Answer

Time is like water in a sponge, as long as you are willing you can always squeeze some.

--Lu Xun, Father of Modern Chinese Literature

Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform