How To Change Number Format In Mail Merge Word 2016
MergeFields are very powerful elements and provide many different options such as additional text that should exist added in front or afterward the field text and a pre-defined format such equally Majuscule or Title Instance.
Simply the most powerful feature is the string formatter for numeric numbers and date values.
A typical sample for a numeric format is a currency. The merge field value comes from a data source and contains a simple Integer and Float value such as the number 24. Merely the field should render the value with a currency symbol and two decimal digits: $24.00.
In this case, the numeric format of the field can be used to return the required format:
Text Command's reporting engine MailMerge supports all standard numeric formats, custom numeric formats and standard and custom date and time formats.
The above sample shows a custom numeric string format. In guild to add a currency symbol and 2 decimal digits, the following formats can be used:
$##,###.00
C2
Results:
2400 -> $2,400.00
The first is a custom format with diverse format specifiers such as zero placeholdes, digit placeholders and decimal points.
The second is a standard numeric format for currencies with 2 decimal digits. The post-obit tabular array lists the standard numeric formats with examples (from MSDN):
Format specifier | Name | Description | Examples |
---|---|---|---|
"C" or "c" | Currency | Result: A currency value. Supported by: All numeric types. Precision specifier: Number of decimal digits. | 123.456 ("C") -> $123.46 |
"D" or "d" | Decimal | Result: Integer digits with optional negative sign. Supported past: Integral types simply. Precision specifier: Minimum number of digits. | -1234 ("D6") -> -001234 |
"E" or "e" | Exponential | Upshot: Exponential notation. Supported by: All numeric types. Precision specifier: Number of decimal digits. | 1052.0329112756 ("E") -> 1.052033E+003 |
"F" or "f" | Fixed-point | Result: Integral and decimal digits with optional negative sign. Supported by: All numeric types. Precision specifier: Number of decimal digits. | 1234 ("F1") -> 1234.0 |
"Yard" or "g" | General | Result: The near meaty of either stock-still-indicate or scientific notation. Supported by: All numeric types. Precision specifier: Number of significant digits. | 123.4546 ("G4") -> 123.5 |
"P" or "p" | Percent | Result: Number multiplied by 100 and displayed with a percentage symbol. Supported by: All numeric types. Precision specifier: Desired number of decimal places. | ane ("P") -> 100,00 % |
"R" or "r" | Round-trip | Outcome: A string that tin round-trip to an identical number. Supported by: Single, Double, and BigInteger. Precision specifier: Ignored. | -1234567890.12345678 ("R") -> -1234567890.1234567 |
The next table lists the custom numeric format specifiers and shows samples produced by each format specifier:
Format specifier | Name | Description | Examples |
---|---|---|---|
"0" | Zilch placeholder | Replaces the cypher with the respective digit if ane is present; otherwise, naught appears in the event string. | 1234.5678 ("00000") -> 01235 |
"#" | Digit placeholder | Replaces the "#" symbol with the respective digit if one is present; otherwise, no digit appears in the result string. | 0.45678 ("#.##") -> .46 |
"." | Decimal bespeak | Determines the location of the decimal separator in the effect string. | 0.45678 ("0.00") -> 0.46 |
"," | Grouping separator and number scaling | Serves as both a group separator and a number scaling specifier. Equally a grouping separator, it inserts a localized grouping separator character between each group. As a number scaling specifier, it divides a number by yard for each comma specified. | 2147483647 ("##,#") -> ii,147,483,647 |
"%" | Per centum placeholder | Multiplies a number by 100 and inserts a localized percentage symbol in the result cord. | 0.3697 ("%#0.00") -> %36.97 |
"‰" | Per mille placeholder | Multiplies a number past 1000 and inserts a localized per mille symbol in the outcome string. | 0.03697 ("#0.00‰") -> 36.97‰ |
\ | Escape graphic symbol | Causes the next grapheme to exist interpreted as a literal rather than every bit a custom format specifier. | 987654 ("\###00\#") -> #987654# |
'string' or "string" | Literal string delimiter | Indicates that the enclosed characters should be copied to the effect string unchanged. | 68 ("# ' degrees'") -> 68 degrees |
; | Section separator | Defines sections with divide format strings for positive, negative, and zip numbers. | 12.345 ("#0.0#;(#0.0#);-\0-") -> 12.35 |
In order to keep clean data in database tables, the formatting of numeric strings should be part of the template. The string formatter provides a powerful mode to format numeric strings or appointment values.
Reporting
The Text Control Reporting Framework combines powerful reporting features with an piece of cake-to-use, MS Word uniform word processor. Users tin create documents and templates using ordinary Microsoft Give-and-take skills. The Reporting Framework is included in all .Net based TX Text Control products including ASP.NET, Windows Forms and WPF.
See Reporting products
Related Posts
Adding SVG Watermarks to Documents
by Bjoern MeyerJanuary 28, 2022
This article shows how to add together SVG images to document department headers that repeat automatically on each folio. This watermark will be inserted vertically and horizontally centered on each section page.
Using MailMerge in ASP.NET Core half dozen Web Applications
by Bjoern MeyerJanuary 27, 2022
This article shows how to use the TX Text Control ASP.Cyberspace MailMerge class to merge templates with JSON data within a .Internet 6 application in Visual Studio 2022.
TX Text Control 30.0 and TX Spell .NET 9.0 Have Been Released
by Bjoern MeyerNovember 29, 2021
We are happy to announce the firsthand availability of TX Text Control 30.0 for all platforms including ASP.NET, Windows Forms, WPF and ActiveX and TX Spell .Net 9.0 for all .Cyberspace based platforms.
TX Text Control X19 and TX Spell 8.0 Take Been Released
past Bjoern MeyerDecember two, 2020
We are happy to announce the firsthand availability of TX Text Control X19 for all platforms including Windows Forms, WPF and ASP.NET and TX Spell .NET 8 for all .Internet based platforms.
Source: https://www.textcontrol.com/blog/2015/01/22/mailmerge-formatting-numeric-strings-in-merge-fields/
Posted by: ortegabeent1988.blogspot.com
0 Response to "How To Change Number Format In Mail Merge Word 2016"
Post a Comment