How to: Specify Data Types for Field Controls
|Visual FoxPro 9.0 SP2|
|How to: Specify Data Types for Field Controls|
You can specify the data type for the output generated by Field controls in reports or labels. The data type you choose determines the format options that are available for output generated from the Field control; however, your selection does not change the data type of the field in the source table.
You can specify formatting for output from a Field control depending on the data type of the output by building a format expression. For example, you might specify uppercase formatting for character output, insert commas or decimal points in numeric output, display numeric output in currency format, or convert one date format to another. For more information, see.
To specify data type and its format settings in a Field control
Open the report or label in the appropriate designer.
In the designer, double-click the Field control you want.
The Field Properties dialog box opens.
If the _REPORTBUILDER system variable is not set to the default Report Builder or is set to a third-party builder, the Report Expression dialog box displays or a different dialog box might display. For more information, see, , and .
In the Field Properties dialog box, click the Format tab if it is not selected.
In the Format expression box, type the format expression you want, which can include format codes and template characters.
On the Format tab, click the data type you want for the Field control.
In the Format options area, select the format codes you want from those available for the selected data type.
When using a combination of format codes and format template characters, precede the list of format template characters with the list of format codes.
When you are finished, click OK.
For more information, see.
Comment or report problem with topic