Udostępnij za pośrednictwem


How to: Add Data to a Chart (Report Designer)

To add data to a chart

  1. In Layout view, right-click the chart and then click Properties.

  2. On the General tab, do the following:

    1. In Name, type a name for the chart.
    2. In Chart type, select the chart type.
    3. In Chart sub-type, select a chart subtype.
  3. On the Data tab, for Dataset name, select a dataset to use for the chart.

  4. In Values, click Add.

    Note

    The values list is used to provide data for the chart. For example, in a column chart, data from the values list determines the height of the columns and the labels on the y-axis of the chart.

  5. On the Values tab of the Edit Chart Value dialog, do the following:

    1. In Series label, type a name for the value series.

    2. In Value, type or select a field expression to use for the value.

      Note

      Depending on the type of chart, the Values tab may contain more than one value box, with different names. For example, an XY scatter chart uses two value boxes, labeled X and Y.

      Note

      If you are grouping data, use an aggregate function with the field expression. For example, for a chart that summarizes sales by product category, use the Sum function with the sales field.

    3. Click OK.

  6. Repeat steps 4 and 5 to add additional value series.

  7. In Categorygroups, click Add.

    Note

    The category group list is used to provide groups of data in the chart. For example, in a column chart, data from the categories list is used to determine the number of columns and the labels on the x axis of the chart.

  8. In the Grouping and Sorting Properties dialog, do the following:

    1. In Name, type a name for the category group.

    2. In Group on, type or select a field expression to group by.

    3. In Label, type or select an expression to use as the category label.

      Note

      Use Label to place a label on the chart for the category. For example, in a column chart, the value of Label is placed on the X axis to describe each column.

    4. Click OK.

  9. Repeat steps 7 and 8 to add additional category groups.

  10. (Optional) In Seriesgroups, click Add.

    Note

    Series groups are optional. The series group list is used to provide dynamic groups of data in the chart. For example, in a column chart, data from the categories list will result in a column for each series group, in each category.

  11. (Optional) In the Grouping and Sorting Properties dialog, do the following:

    1. In Name, type a name for the series group.

    2. In Group on, type or select a field expression to group by.

    3. In Label, type or select an expression to use as the category label.

      Note

      Use Label to place a label on the chart for the series. For example, in a column chart, the value of Label is placed in the legend to describe each column.

    4. Click OK.

  12. (Optional) Repeat steps 10 and 11 to add additional category groups.

See Also

Concepts

Working with Chart Data Regions
Report Designer How-to Topics

Other Resources

Report Designer F1 Help

Help and Information

Getting SQL Server 2005 Assistance