Successfully!

Error!

Data Display Format

  • Last update:  2023-07-28
  • Overview

    Version

    Report Server Version

    Functional Change

    11.0

    /

    11.0.6

    Supports the format of Thousandths.

    11.0.10

    1. Supports batch modification of the cell format.

    2. Moved Format from Cell Element > Advanced to the bottom of Cell Element.

    Functions

    If the data format obtained from the data table is not the one you want, you can set the display format for the data in the cell.

    As shown in the figure below, change the format of Ship Date into YYYY/MM/DD and add  in front of Freight Charge.

     1.png

    Format Setting

    Where to Set

    Choose Insert > Cell Element and you can see the format setting interface.

     2.png

    Format Type

    You can set display formats like Number and Date for data.

    General (The output data format is the same as the input data format.) is set by default.

     3.png

    Number

    Format Specifier

    Definition

    Example

    0

    Placeholder format specifier (zero-padding)

    Format: 0.0

    Actual data: 1, 2.2, and 3.33

    Display data: 1.0, 2.2, and 3.3

    #

    Placeholder format specifier (no zero-padding)

    Format: 0.#

    Actual data: 1, 2.2, and 3.33

    Display data: 1, 2.2, and 3.3

    Some built-in common formats in the designer are shown in the following figure.

     4.png

    You can also manually edit and customize the relevant formats. For example:

    Format: #0

    Actual data: 01, 1, 2.2, and 3.33

    Display data: 1, 1, 2, and 3

    Currency

    ¤0 specifies adding a ¥ in front of an integer. The display rule of ¤# and ##0.00 is similar to that of Number.

     5.png

    Percentage

    1. You can determine to display a certain number of decimal places. You can also add additional digits and other characters as needed. ..

    iconNote:
     In Percentage, when the system rounds decimal places, it follows the rule of rounding up odd numbers and rounding down even numbers.

     6.png

    2. You can tick Rounding in Percentage.

     7.png

    The specific logic of Rounding is shown in the following figure.

     9.png

    Thousandths

    1. You can determine to display a certain number of decimal places. You can also add additional digits and other characters as needed. ..

     10.png

    2. You can set Rounding in Thousandths.

     11.png

    The specific logic of Rounding is the same as that of Percentage.

    Date

    You can set the display format of dates. For example, if you hope to display data as the format 2011/01/01, you can select yyyy-MM-dd.

    iconNote:

    1. Month must be in uppercase M, otherwise it cannot be recognized.

    2. Date format can be manually entered.

     12.png

    Other formats are omitted.

    Example

    Opening the Report

    Open the report %FR_HOME%\webroot\WEB-INF\reportlets\doc\Primary\DetailReport\Change_Display_Value.cpt.

    Click to download the template: Change_Display_Value.cpt

    Setting Date Format

    Select cell D2 and choose Cell Element > Format > Date > yyyy-MM-dd.

    iconNote:
    If the yyyy-MM-dd format is not available in the list, you can manually enter it.

     13.png

    Setting Currency Format

    Select cell G2 and choose Cell Element > Format > Currency.

    iconNote:
    If you are using a Linux English system, change the format into #0.00.

     14.png

    Function of Styles

    You can define the display format for the values (such as number and date) of actual cells in Cell Attributes > Style, without changing the actual values.

    For numbers and amounts, they generally need to be set to right-aligned display.

    Demonstration

    Save the template and click Pagination Preview. The effect is shown in section "Functions".

    Downloading the Template

    For the finished template, see %FR_HOME%\webroot\WEB-INF\reportlets\doc\Primary\DetailReport\Data/_Display_Format.cpt.

    Click to download the template: Data_Display_Format.cpt


    Attachment List


    Theme: Report Application
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read

    Doc Feedback