Databases Reference
In-Depth Information
Format Element
Type
Description
Example
Mm
DateTime
Minutes, two numerals
35
Ss
DateTime
Seconds, two numerals
45
Tt
DateTime
12-hour time using AM
or PM
AM or PM
T
DateTime
12-hour time using A or P
A or P
0
Number
Required numeral
09
placeholder
#
Number
Optional numeral
placeholder
%
Number
Percentage
.95 = 95%
. , : - /
Any
Literals
123.45
1,234
12:34 PM
Let's use a common scenario as an example. Say that your company has offices around the world and
follows a corporate standard to use European-style dates, regardless of where users are located. Instead
of letting the system decide how to format dates, you want them to be explicitly formatted using your
corporate standard.
If you set the Format property of the date type controls to the string MMMM d , yyyy , the resulting date
will be displayed in this format: November 1, 2003.
Conditional Formatting
Under certain conditions, you may need to alter the format of a value based on an expression related to
other fields or conditions in the report. The use of different functions and expressions will be discussed
in Chapter 6. For now, let's take a look at a couple of examples to explore the concept and some tech-
niques. The following is simply an example to demonstrate how regional formatting can vary and is not
a common business solution.
Let's say that your company has locations in England, Germany, and the United States, and, for what-
ever reason (remember, we're making this up), you want different rows to display information format-
ted for the corresponding locales. Each row in the underlying table includes a column named MyLocale
that holds your own two-character code for the locale. The industry has a five-character standard known
Search WWH ::




Custom Search