Listbox & Rectangle in SSRS

Rectangle

A rectangle item can have many different uses. Arectangle is simply used to visually separate a region of the report. It may be used to visually contain other items. If items such as text boxes, grids, and so on are placed into a rectangle, all these items can be moved together by simply moving the rectangle. A rectangle may also be used as a data container for data items and can be related to and repeated with a parent container.

List

A list data region is a data-bound report item that contains a single column of multi-instance data on a report. A list can be used for free-form reports or in conjunction with other data regions. You can define lists that contain any number of report items. A list can be nested within another list to provide multiple groupings of data.

To add a list
  • Open the client report definition (.rdlc) file in graphical design mode.
  • In the Toolbox, click List.
  • On the design surface, drag a box to the size you want the list to be. Alternatively, click the design surface to create a list of fixed size.

To bind data to a list, drag a field from the Data Sources window onto the list. Data in a list can be placed into groups and then sorted. For example, you might group products within product categories within departments and then sort the data in ascending order.

To add a group to a list
  1. Right-click the list, and then click Properties.
  2. On the General tab, click Edit details group. This opens the Details Grouping dialog box.
  3. On the General tab, do the following:
    • In Name, type the name of the group.
    • In Group on, type or select the expressions by which to group the data.
    • (Optional) In Document map label, type or select an expression to use as a document map label.
    • (Optional) If this group is a recursive hierarchy, for Parent group, type or select an expression to use as the recursive group parent.
    • (Optional) Click Page break at start or Page break at end to place a page break at the beginning or end of each group instance.

  4. (Optional) On the Filters tab, select or type expressions by which to filter the data within the group.
  5. (Optional) On the Visibility tab, select the visibility options for the item.
  6. (Optional) On the Data Output tab, select the data output options for the item, and then click OK.