I've been playing around with FastReport in FMX. To be honest, I've been struggling a bit. So, today I decided to go back to square one and work through the FMX documentation on the FastReport website.
https://www.fast-report.com/public_download/docs/FRVCL/online/en/index.html
The "Text" object (TfrxViewMemo) is extremely powerful. It accepts simple HTML tags that lets you modify a single text field in some really cool ways. It's kind of like a mini "Rich Text" object.
Here is a what a working example is supposed to look like:
That is one text field with multiple effects applied to separate sections:
- Bold
- Italic
- Bold and Italic
- Superscript
- Subscript
- Color
I ran into an issue when I followed the example to create the "Orange" text. It didn't work. The Original example from the FastReports did not turn the text orange.
Using <font color="#FF8030"> did not display the text in orange. The text between the opening and closing font tags did not display at all. Seeing that the "red" font tag worked, I tried using the color name "orange". And it worked.
I then tried using the Alpha Color of #FFFF8030 and it also worked.
I'm glad I was able to make the FastReport example work. The text object is very powerful. I experimented with several different Delphi Color name constants and they also worked. I did run into an issue with some of the obsolete color name constants, such as MoneyGreen. The FastReport designer did not recognize "MoneyGreen" as a valid integer. It did however take the MoneyGreen HEX equivalent of #FFC0DCC0.
I decided to create a the following cheat sheet of all the font color names that FastReport text object will recognize.
Name |
Color |
HEX Code |
Aliceblue
|
Aliceblue
|
#FFF0F8FF
|
Antiquewhite
|
Antiquewhite
|
#FFFAEBD7
|
Aqua
|
Aqua
|
#FF00FFFF
|
Aquamarine
|
Aquamarine
|
#FF7FFFD4
|
Azure
|
Azure
|
#FFF0FFFF
|
Beige
|
Beige
|
#FFF5F5DC
|
Bisque
|
Bisque
|
#FFFFE4C4
|
Black
|
Black
|
#FF000000
|
Blanchedalmond
|
Blanchedalmond
|
#FFFFEBCD
|
Blue
|
Blue
|
#FF0000FF
|
Blueviolet
|
Blueviolet
|
#FF8A2BE2
|
Brown
|
Brown
|
#FFA52A2A
|
Burlywood
|
Burlywood
|
#FFDEB887
|
Cadetblue
|
Cadetblue
|
#FF5F9EA0
|
Chartreuse
|
Chartreuse
|
#FF7FFF00
|
Chocolate
|
Chocolate
|
#FFD2691E
|
Coral
|
Coral
|
#FFFF7F50
|
Cornflowerblue
|
Cornflowerblue
|
#FF6495ED
|
Cornsilk
|
Cornsilk
|
#FFFFF8DC
|
Crimson
|
Crimson
|
#FFDC143C
|
Cyan
|
Cyan
|
#FF00FFFF
|
Darkblue
|
Darkblue
|
#FF00008B
|
Darkcyan
|
Darkcyan
|
#FF008B8B
|
Darkgoldenrod
|
Darkgoldenrod
|
#FFB8860B
|
Darkgray
|
Darkgray
|
#FFA9A9A9
|
Darkgreen
|
Darkgreen
|
#FF006400
|
Darkgrey
|
Darkgrey
|
#FFA9A9A9
|
Darkkhaki
|
Darkkhaki
|
#FFBDB76B
|
Darkmagenta
|
Darkmagenta
|
#FF8B008B
|
Darkolivegreen
|
Darkolivegreen
|
#FF556B2F
|
Darkorange
|
Darkorange
|
#FFFF8C00
|
Darkorchid
|
Darkorchid
|
#FF9932CC
|
Darkred
|
Darkred
|
#FF8B0000
|
Darksalmon
|
Darksalmon
|
#FFE9967A
|
Darkseagreen
|
Darkseagreen
|
#FF8FBC8F
|
Darkslateblue
|
Darkslateblue
|
#FF483D8B
|
Darkslategray
|
Darkslategray
|
#FF2F4F4F
|
Darkslategrey
|
Darkslategrey
|
#FF2F4F4F
|
Darkturquoise
|
Darkturquoise
|
#FF00CED1
|
Darkviolet
|
Darkviolet
|
#FF9400D3
|
Deeppink
|
Deeppink
|
#FFFF1493
|
Deepskyblue
|
Deepskyblue
|
#FF00BFFF
|
Dimgray
|
Dimgray
|
#FF696969
|
Dimgrey
|
Dimgrey
|
#FF696969
|
Dodgerblue
|
Dodgerblue
|
#FF1E90FF
|
Firebrick
|
Firebrick
|
#FFB22222
|
Floralwhite
|
Floralwhite
|
#FFFFFAF0
|
Forestgreen
|
Forestgreen
|
#FF228B22
|
Fuchsia
|
Fuchsia
|
#FFFF00FF
|
Gainsboro
|
Gainsboro
|
#FFDCDCDC
|
Ghostwhite
|
Ghostwhite
|
#FFF8F8FF
|
Gold
|
Gold
|
#FFFFD700
|
Goldenrod
|
Goldenrod
|
#FFDAA520
|
Gray
|
Gray
|
#FF808080
|
Green
|
Green
|
#FF008000
|
Greenyellow
|
Greenyellow
|
#FFADFF2F
|
Grey
|
Grey
|
#FF808080
|
Honeydew
|
Honeydew
|
#FFF0FFF0
|
Hotpink
|
Hotpink
|
#FFFF69B4
|
Indianred
|
Indianred
|
#FFCD5C5C
|
Indigo
|
Indigo
|
#FF4B0082
|
Ivory
|
Ivory
|
#FFFFFFF0
|
Khaki
|
Khaki
|
#FFF0E68C
|
Lavender
|
Lavender
|
#FFE6E6FA
|
Lavenderblush
|
Lavenderblush
|
#FFFFF0F5
|
Lawngreen
|
Lawngreen
|
#FF7CFC00
|
Lemonchiffon
|
Lemonchiffon
|
#FFFFFACD
|
Lightblue
|
Lightblue
|
#FFADD8E6
|
Lightcoral
|
Lightcoral
|
#FFF08080
|
Lightcyan
|
Lightcyan
|
#FFE0FFFF
|
Lightgoldenrodyellow
|
Lightgoldenrodyellow
|
#FFFAFAD2
|
Lightgray
|
Lightgray
|
#FFD3D3D3
|
Lightgreen
|
Lightgreen
|
#FF90EE90
|
Lightgrey
|
Lightgrey
|
#FFD3D3D3
|
Lightpink
|
Lightpink
|
#FFFFB6C1
|
Lightsalmon
|
Lightsalmon
|
#FFFFA07A
|
Lightseagreen
|
Lightseagreen
|
#FF20B2AA
|
Lightskyblue
|
Lightskyblue
|
#FF87CEFA
|
Lightslategray
|
Lightslategray
|
#FF778899
|
Lightslategrey
|
Lightslategrey
|
#FF778899
|
Lightsteelblue
|
Lightsteelblue
|
#FFB0C4DE
|
Lightyellow
|
Lightyellow
|
#FFFFFFE0
|
Lime
|
Lime
|
#FF00FF00
|
Limegreen
|
Limegreen
|
#FF32CD32
|
Linen
|
Linen
|
#FFFAF0E6
|
Magenta
|
Magenta
|
#FFFF00FF
|
Maroon
|
Maroon
|
#FF800000
|
Mediumaquamarine
|
Mediumaquamarine
|
#FF66CDAA
|
Mediumblue
|
Mediumblue
|
#FF0000CD
|
Mediumorchid
|
Mediumorchid
|
#FFBA55D3
|
Mediumpurple
|
Mediumpurple
|
#FF9370DB
|
Mediumseagreen
|
Mediumseagreen
|
#FF3CB371
|
Mediumslateblue
|
Mediumslateblue
|
#FF7B68EE
|
Mediumspringgreen
|
Mediumspringgreen
|
#FF00FA9A
|
Mediumturquoise
|
Mediumturquoise
|
#FF48D1CC
|
Mediumvioletred
|
Mediumvioletred
|
#FFC71585
|
Midnightblue
|
Midnightblue
|
#FF191970
|
Mintcream
|
Mintcream
|
#FFF5FFFA
|
Mistyrose
|
Mistyrose
|
#FFFFE4E1
|
Moccasin
|
Moccasin
|
#FFFFE4B5
|
Navajowhite
|
Navajowhite
|
#FFFFDEAD
|
Navy
|
Navy
|
#FF000080
|
Oldlace
|
Oldlace
|
#FFFDF5E6
|
Olive
|
Olive
|
#FF808000
|
Olivedrab
|
Olivedrab
|
#FF6B8E23
|
Orange
|
Orange
|
#FFFFA500
|
Orangered
|
Orangered
|
#FFFF4500
|
Orchid
|
Orchid
|
#FFDA70D6
|
Palegoldenrod
|
Palegoldenrod
|
#FFEEE8AA
|
Palegreen
|
Palegreen
|
#FF98FB98
|
Paleturquoise
|
Paleturquoise
|
#FFAFEEEE
|
Palevioletred
|
Palevioletred
|
#FFDB7093
|
Papayawhip
|
Papayawhip
|
#FFFFEFD5
|
Peachpuff
|
Peachpuff
|
#FFFFDAB9
|
Peru
|
Peru
|
#FFCD853F
|
Pink
|
Pink
|
#FFFFC0CB
|
Plum
|
Plum
|
#FFDDA0DD
|
Powderblue
|
Powderblue
|
#FFB0E0E6
|
Purple
|
Purple
|
#FF800080
|
Red
|
Red
|
#FFFF0000
|
Rosybrown
|
Rosybrown
|
#FFBC8F8F
|
Royalblue
|
Royalblue
|
#FF4169E1
|
Saddlebrown
|
Saddlebrown
|
#FF8B4513
|
Salmon
|
Salmon
|
#FFFA8072
|
Sandybrown
|
Sandybrown
|
#FFF4A460
|
Seagreen
|
Seagreen
|
#FF2E8B57
|
Seashell
|
Seashell
|
#FFFFF5EE
|
Sienna
|
Sienna
|
#FFA0522D
|
Silver
|
Silver
|
#FFC0C0C0
|
Skyblue
|
Skyblue
|
#FF87CEEB
|
Slateblue
|
Slateblue
|
#FF6A5ACD
|
Slategray
|
Slategray
|
#FF708090
|
Slategrey
|
Slategrey
|
#FF708090
|
Snow
|
Snow
|
#FFFFFAFA
|
Springgreen
|
Springgreen
|
#FF00FF7F
|
Steelblue
|
Steelblue
|
#FF4682B4
|
Tan
|
Tan
|
#FFD2B48C
|
Teal
|
Teal
|
#FF008080
|
Thistle
|
Thistle
|
#FFD8BFD8
|
Tomato
|
Tomato
|
#FFFF6347
|
Turquoise
|
Turquoise
|
#FF40E0D0
|
Violet
|
Violet
|
#FFEE82EE
|
Wheat
|
Wheat
|
#FFF5DEB3
|
White
|
White
|
#FFFFFFFF
|
Whitesmoke
|
Whitesmoke
|
#FFF5F5F5
|
Yellow
|
Yellow
|
#FFFFFF00
|
Yellowgreen
|
Yellowgreen
|
#FF9ACD32
|
Osolete Color Names Use HEX Code
|
LtGray
|
LtGray
|
#FFC0C0C0
|
MedGray
|
MedGray
|
#FFA0A0A0
|
DkGray
|
DkGray
|
#FF808080
|
MoneyGreen
|
MoneyGreen
|
#FFC0DCC0
|
LegacySkyBlue
|
LegacySkyBlue
|
#FFF0CAA6
|
Cream
|
Cream
|
#FFF0FBFF
|
Enjoy!
Semper Fi
Gunny Mike