EvaluateContents Event
Occurs just before ReportListener begins rendering objects for a band, for each layout element of Expression type, providing an opportunity to change its attributes.
PROCEDURE Object.EvaluateContents
LPARAMETERS nFRXRecno, oObjProperties |
Parameters
Visual FoxPro passes the EvaluateContents event parameters in the following order:
- nFRXRecno
-
Integer data type, specifying the record number in the report or label definition file (frx or lbx) describing the layout element being rendered.
- oObjProperties
-
An object of Empty class, with members providing values relevant to adjusting the attributes of an Expression layout element.
oObjProperties member Type Usage reload
Logical, defaults to .F.
Flag to alert the ReportListener if you make changes.
Set this value to True (
.T.) to notify the ReportListener of changes to any of the read/write members of oObjProperties.text
Character, defaults to evaluated contents of the Expression layout element.
You can change this value to change the rendered contents of the Expression at run time.
value
Variant, readonly
This value provides the evaluated results of report expressions, including calculated fields, of the following data types:
Double (B)
Date (D)
Float (F)
Integer (I)
Logical (L)
Numeric (N)
DateTime (T)
Currency (Y)
Null (X)
For other data types, its contents is a null string (
"").Expressions concatenated with the special operators "
;" and "," may have elements of mixed type, and are considered character strings (type "C") in this context. For more information, see Trimming and Concatenating Expressions.fontname
Character, defaults to the font stored in the report or label definition table for this layout element.
You can change this value to change the font of the Expression at run time.
fontstyle, fontsize
Integer, default to the numeric style and size values stored in the report or label definition table for this layout element.
You can change these values to change the size and style of the font used to render this Expression at run time.
Recognized numeric values for oObjProperties.fontstyle are documented in the 60FRX.DBF table in the FILESPEC directory.
For more information about 60FRX, see Table Structures of Table Files (.dbc, .frx, .lbx, .mnx, .pjx, .scx, .vcx).
fillred, fillblue, fillgreen, penred, penblue, pengreen
Integer, valid values
0to255, defaults to255, defaults to the values stored in the report or label definition table, unless the table value was-1to indicate "use default". If the table value was -1, the ReportListener substitutes the real value it intends to use.You can change these values to change the Red, Blue, and Green components of the Fill and Pen colors for an Expression element.
For more information, see How to: Change Colors in Report Controls.
If a non-valid value or non-numeric value is passed for any of the color properties, they revert to default values stored in the report definition table. No error occurs.
fillalpha
Integer, valid values
0to255, defaults to0when backstyle is transparent and255when backstyle is opaque.See Remarks below for information on using the alpha values of report layout elements. If a non-valid value or non-numeric value is passed for this value, it reverts to the default value as shown in this chart.
For information on report backstyle settings (transparent and opaque), see How to: Change Opacity of Report Controls.
penalpha
Integer, valid values
0to255, defaults to255(opaque).See Remarks below for information on using the alpha values of report layout elements.
If a non-valid value or non-numeric value is passed for this value, it reverts to the default value as shown in this chart.
Note Microsoft reserves the right to invoke EvaluateContents for additional report and label layout elements, as needed, and to add to the oObjProperties members appropriately for these additional layout element types. You can use nFRXRecno to test for layout element type, as shown in the sample code in Render Method.
Remarks
Example
See Also
© , 1996-2020 • Updated: 11/10/20
Comment or report problem with topic
Microsoft Visual FoxPro 9 SP2 Help file, VFPX Edition v1.08