Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Does the UDF of Expression run more than once?
Message
From
12/04/2002 11:13:21
 
 
To
12/04/2002 10:05:30
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00644252
Message ID:
00644326
Views:
20
Hi John,
I do something very similar for report headers and captions, as well as form labels and messages. For reports, I set column headings to a variable before the report runs and reference this variable in the report form.
m.column1head = myLocalize("myheading1")
m.column2head = myLocalize("myheading2")
...
The report heading or caption is a field with expression m.column1head.

This presets the headings and label text on the report to a variable that contains the localized values. The report data is assumed to already be localized so no need to convert that. This method requires private variables to be created before running the report and makes the report form more cryptic to look at , but prevents re-evaluation / rerun of myLocalize() for each time the localized string is printed. A kind of side benefit if you also use a similar strategy for data fields having the expression = evaluate(m.mydatafield1) is that if you have a bunch of simple 2 ro 3 column report forms, the same report form can be used for multiple reports, since all report objects are variables not hard coded to the report form. In my testing, my reports run with virtually no speed difference when localized text is in a field or if non-localized text is hard coded as a label on the report form.
HTH
Elmer
Previous
Reply
Map
View

Click here to load this message in the networking platform