Transport List Report Task 3: Populating a Table Item

This excerpt from Chapter 5 of the book Microsoft SQL Server 2005 Reporting Services 2005 explains how to place a table item on a report and populate it.

Microsoft SQL Server 2005: The Complete Reference The following excerpt, courtesy of McGraw-Hill Osborne Media, is from Chapter 5 of the book Microsoft SQL Server 2005 Reporting Services 2005 written by Brian Larson. Click here to purchase the book.



Populating a table item

Transport List Report, Task 3: Place a Table Item on the Report and Populate It

  1. Click the Layout tab to begin working on the report layout.

  2. NOTE

    Your installation of the Report Designer may be using a feature called Auto-Hide with the Toolbox. Auto-Hide is used to provide more screen space for your report layout. When Auto-Hide is active for the Toolbox, the Toolbox is only represented on the screen by a tab containing a tool icon and the word "Toolbox" at the extreme left side of the window. To view the actual Toolbox, place your mouse pointer on top of this tab. After a second or two, the Toolbox appears. Once your mouse pointer moves off the Toolbox, it is automatically hidden again.


  3. Click the Table report item in the Toolbox. The mouse pointer changes to a table icon and crosshairs when you move your mouse pointer over the report layout area, as shown in the next illustration.

  4. Figure 9

  5. Click-and-drag the mouse over the lower three-quarters of the report layout area, as shown in the following illustration. Note, when you begin dragging, the mouse pointer changes back to the usual arrow icon.

  6. Figure 10

  7. When you release the mouse button, after dragging, a table is created to occupy the area you just defined. By default, every cell in the table is occupied by an empty text box. Click in each cell of the table, and note the name and type of report item shown at the top of the Properties window.
  8. Let's take a few moments to go over the methods for selecting various parts of the table. You have already seen how to select individual cells. The gray border on top of and to the left of the table item provides handles for selecting other parts of the table. Click any of the gray rectangles in the border above the table item. This action selects the corresponding column, as shown in the following illustration.

  9. Figure 11

  10. Click any of the gray rectangles in the border to the left of the table item. This action selects a row, as shown here.

  11. Figure 12

  12. Click the gray square in the upper-left corner of the border. This action selects the entire table. When the entire table is selected, the gray border is replaced by the sizing handles (the small white squares) for the table. You must select the entire table before you can move and size the table item.
  13. In the Datasets window, expand the TransportList dataset. Drag the SerialNumber field from the Datasets window and drop it on the middle-left table cell. An expression that returns the value of the SerialNumber field is placed in the text box that occupies the middle-left table cell. The name of the field is used to create a column heading. This is placed in the upper-left table cell.
  14. Drag the PurchaseDate field from the Datasets window and drop it on the center table cell. Drag the LatestRepairDate field from the Datasets window and drop it on the middle-right table cell. The report layout should now appear, as shown next.

  15. Figure 13

  16. Select the header row (the top row) by clicking the gray rectangle in the border to the left of the row.
  17. Make the following changes in the Properties window:
  18. Property New Value
    FontWeight (expand the Font property to find the FontWeight property) Bold
    TextDecoration Underline

  19. In the gray border to the left of the table, click the line between the header row and the detail row. Drag it to reduce the height of the header row.
  20. In the gray border to the left of the table, click the line between the detail row and the footer row. Drag it to reduce the height of the detail row.
  21. Click the center cell in the table. Hold down SHIFT and click the middle-right cell in the table. Both of these cells are now selected. Make the following changes in the Properties window:
  22. Property New Value
    Format MM/dd/yyyy
    TextAlign Left

  23. Click the Preview tab to preview the report. The report should appear as shown here.

  24. Figure 14

    Task Notes In the Properties window are several instances where a group of related properties are combined under a summary property. For instance, the FontStyle, FontFamily, FontSize, and FontWeight properties are combined under the Font property. The Font property serves as a summary of the other four. Initially, only the summary property is visible in the Properties window. A plus (+) sign to the left of a property tells you it is a summary property and has several detail properties beneath it. The summary property has a value that concatenates the values of all the detail properties underneath it. For example, suppose the FontStyle, FontFamily, FontSize, and FontWeight properties have the following values:

    FontStyle: Normal
    FontFamily: Arial
    FontSize: 10pt
    FontWeight: Bold

    In that case, the Font property has this value:

    Font: Normal, Arial, 10pt, Bold

    You can change the value of a detail property by editing the concatenated values in the summary property, or you can expand the summary property and edit the detail properties directly.

    Click for the next excerpt in this series: Transport List Report Task 4: Add Table Grouping

This was first published in February 2006

Dig deeper on Microsoft SQL Server Reporting Services (SSRS)

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchBusinessAnalytics

SearchDataCenter

SearchDataManagement

SearchAWS

SearchOracle

SearchContentManagement

SearchWindowsServer

Close