Udostępnij za pośrednictwem


Lesson 6: Applying Formatting and Style

There are additional tasks that you can perform to clean up the report and make it easier to read.

Date Format

The OrderDate field displays date and time information by default. You can add formatting to display only the date.

To format a date field

  1. Right-click the cell with the OrderDate field expression and then click Properties. The Textbox Properties dialog box appears.

  2. Open the Format tab and click the browse button (indicated by the ellipses button label) to open the Choose Format dialog box.

  3. For Format, select Standard, select Date, and then select the third example on the list (short date).

  4. Click OK to close the Choose Format dialog box, and then click OK again to close the Textbox Properties dialog box.

Choose Date Format dialog box

Currency Format

The TotalDue field displays a general number. Add formatting to display the number in currency format.

To format a currency field

  1. Right-click the cell with the TotalDue field expression and then click Properties.

  2. Open the Format tab and click the browse button (indicated by the ellipses button label) to open the Choose Format dialog box.

  3. For Format, select Standard, select Currency, click OK, and then click OK again to close the Textbox Properties dialog box.

Choose Currency Format dialog box

Text Style and Column Widths

You can also add style to the table headers to differentiate them from the rows of data in the report, and adjust the widths of the columns.

To format table headers

  1. Click the table so that column and row handles appear above and next to the table.

  2. Select the row handles of the first, second, and fourth rows (the row containing column header labels, the group header row, and the group footer row) and then click the Bold (B) button on the formatting toolbar.

    Note

    To select multiple items, hold down the CTRL key and click on each item.

  3. Point to the line between column handles so that the cursor changes into a double arrow. Drag the columns to size.

Resize arrows for column in table data region

Next Steps

You have successfully applied formatting that applies a style to column headers and changes how date and currency values are formatted. Next, you will preview the report to view your changes. See Lesson 7: Publishing the Updated Report.

See Also

Concepts

Tutorial: Adding Grouping, Sorting, and Formatting to a Basic Report

Other Resources

Applying Style Properties to Report Items
Formatting Numeric and Date Values in a Report

Help and Information

Getting SQL Server 2005 Assistance