I. Overview
1. Version
| Report server version |
|---|
| 10.0 |
2. Function introduction
The data style from the data table is not what we want.

As shown in the figure below, the date of sign and ship is changed to the format of year-month-day, and the amount is preceded by "$"

At this point, you need to set the display style of cells. Let's introduce the modification method of data display style with a simple example.
II. Formatting
1. Function entry
Click Menu Insert > Cell Attributes> Style to see the format settings of the cell, as shown in the following figure:

2. Types of formats
The format setting of the cell can set the display format for numbers, time and other data, as shown in the following figure:

| Format character | Definition | Example |
|---|---|---|
| 0 | Placeholder format, fill with 0 if missing | Format: 0.0 Actual data: 1, 2.2, 3.33 Display data: 1.0, 2.2, 3.3 |
| # | Placeholder format, if it is insufficient, 0 will not be added. | Format: 0.# Actual data: 1, 2.2, 3.33 Display data: 1, 2.2, 3.3 |
Some common formats built into the designer, as shown in the following figure:

Users can also manually edit and customize related formats, such as:
Format: #0.0m
Actual data: 1, 2.2, 3.33
Display data: 1.0m, 2.2m, 3.3m
The currency part ¤0 means adding a $ in front of the integer, and its ¤#,##0.00 is similar to the principle of the number part.

In the percentage, you can choose how many digits after the decimal to display, or you can add digits and other characters by yourself. As shown below:
Note: In the percentage style, when taking the number of decimal places, follow the rule of odd and even.

The display style of the date can be set in the date type. For example, if you want the data of the date type to be displayed in the format of "20110101", you can set the style to "yyyyMMdd". The date style is shown in the following figure:
Note 1: The month must be an uppercase M, and a lowercase m cannot be recognized.
Note 2: Manual input is available when setting the date format.

Other parts of the format will not be repeated.
III. Examples
1. Report design
Create a new data set DS1, write the SQL query statement select * from orders in the database query.
Design the table as following:
2. Setting date style
Select the SignDate and ShipDate data column cell, select cell attributes > style > Custom Style > text > format, select date type, and change it to yyyy-M-d, as shown in the following figure:

Note: if there is no yyyy MM DD format in the list, you can enter it manually.
3. Setting currency style
Select the amount data column cell, select cell attributes > style > Custom Style > text > format, and select currency, as shown in the following figure:

Note: for Linux English system, change it to $0.00
4. the role of style
Users can define the display format for the values of actual cells such as numbers and dates through cell styles, and view more styles without changing the actual values.
Of course, for numbers, amounts, etc., they should be set to the right aligned.
5. Effect preview
Save the template and click pagination preview. The effect is shown in I.2 Overview.
6. Template download
For completed templates, please refer to:
%fr_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\ReportDesign\DataFormat.cpt
Click to download the template: