Tuesday, March 12, 2013

Changing the Data in the Report


Changing the Data in the Report

To change the data that’s displayed in the report, you must change the query.
To change the query
1.   In the Report Data tree, right-click the dataset, by default this is DataSet1, and then select Query. This starts the Query Designer.
2.   Within the Query Designer, click the Edit As Text button to edit the query directly in the window. Click the Import… button to use a query that you saved previously. The ! button runs the query and displays the results in the lower pane of the Query Designer. If the report does not show the data that you expected, you can revise the query and test it without recreating the report.
Changing the Appearance of the Report
Within the report dataset, you can change the rows, columns, or individual cells. When you click any cell in the dataset, borders will appear around the table. You can click the border to select a row or a column. To select a specific cell in the table, click in that cell. The properties for the row, column, or cell you selected are displayed in the Properties window. By default, this window is located at the lower-right corner of the interface.
To change the name of a column, click in the column heading and edit the text in the text box. You can also change the font, background color, text color, and many other properties of the text box with the Properties window. Drag the borders of the column to change the column’s size. Reorder the columns by dragging them to the new desired position.
To enable sorting in table columns
1.   Right-click the column to which you want to add sorting, and click Text Box Properties. The Text Box Properties window opens.
2.   Click the Interactive Sorting tab. Select the check box Enable interactive sorting on this text box. You can select to sort by detail rows or by groups. Select the column to sort by, and then click OK.
Note: If you want the report to sort on a particular field by default, add an ORDER BY clause to the query.
Adding a Chart to the Report
Instead of, or in addition to, the table or matrix you may want to include a chart in the report for a visual representation of the data.
To add a chart to the report
1.   You may need to expand the report area to provide sufficient room for the chart by using the resize handles.
2.   Click View, and then click Toolbox. The toolbox dialog box opens; you may want to pin the toolbox in place. In the toolbox, click Chart, and then click in the report to place the chart, or drag to size the chart in the report space.
3.   The Select Chart Type dialog box appears, giving you various chart choices. Select the type of chart you want to add, and then click OK. The chart appears on the design surface.
4.   Drag the chart in the report to move it or use the resize controls to resize it.
5.   Click the area labeled Axis Title to change the text on the axis.
6.   To add data fields to the report, select the Report Data pane (click View, and then Report Data if the Report Data pane is no longer visible), and expand the dataset to show the data fields the query retrieves. On the design surface, click the chart that you added. This reveals three areas around the border of the chart as follows:
a.   Drop data fields here: Drag data fields here that you want to represent as values in the chart (for example, the height of the bars in a bar graph).
b.   Drop category fields here: Drag data fields here for which you want to present the values (for example, the items on the x-axis in a bar graph).
c.   Drop series fields here: These fields are optional. Drag data fields here to add an extra dimension to the chart (for example, if a bar graph has multiple data fields for a single category field).
7.   With the chart selected, the Properties window lets you define the properties of the chart itself, such as the colors, borders, and size.

No comments:

Post a Comment