Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Collapse]Rich Text Editor
    Overview
   [Expand]Getting Started
   [Collapse]Fundamentals
    [Expand]RichEditControl
    [Expand]Document
     Supported Document Formats
    [Collapse]Fields
     [Expand]Field Codes
     [Collapse]Format Switches
       General Format Switch
       Numeric Format Switch
       Date and Time Format Switch
      Field Structure
      Inserting a Field
      Field Display Modes
      Updating a Field
      Field Types
     Commands
     Services
     Layout API
     Product Class Structure
     Default Keyboard Shortcuts
     Measure Units
     HTML Tag Interpretation
   [Expand]Concepts
   [Expand]Visual Elements
   [Expand]Examples
   [Expand]Member Tables
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Numeric Format Switch

Expanded Syntax

\# [ " ] switch-argument [ " ]

A numeric switch-argument is like a numeric format string. If a switch-argument contains spaces, enclose it in quotation marks.

If the result type of a field is not numeric, this switch has no effect.

Expanded Specifiers

You can combine the following specifiers to construct a format string.

Item Usage
# Specifies the numeric places to display in the result. If the result does not include a digit in that place, a space is displayed.
0 (zero) Specifies the numeric places to display in the result. If the result does not include a digit in that place, a 0 (zero) is displayed.
. (decimal point) Determines the decimal point position. The actual decimal symbol is dependent on the local Culture. You can specify it in the Regional settings (Control Panel).
, (digit grouping symbol) Separates a series of three digits. The actual symbol is dependent on the local Culture. You can specify it in the Regional settings (Control Panel).
x Drops digits to the left of the "x" placeholder. If the placeholder is to the right of the decimal point, the result is rounded to that position.
- (minus sign) Adds a minus sign to a negative result, or adds a space if the result is positive or 0 (zero).
+ (plus sign) Adds a plus sign to a positive result, a minus sign to a negative result, or a space if the result is 0 (zero).
other symbol(s) Includes the specified character in the result.
'text' Adds text to the result. The text can contain any symbols, special symbols mentioned above are not interpreted.
"positive; negative; zero" You can use combinations for displaying positive, negative and zero values differently - just use a semicolon between switch arguments. For example, { MERGEFIELD Amount \# $#,##0.00;-$#,##0.00;$0 } displays positive values using $#,##0.00, negative values using -$#,##0.00, and zero values using $0.

How would you rate this topic?​​​​​​​