Creating a chart data region
We will also incorporate our second data region through this recipe. The same report has two sections that summarize the same data in alternate ways.
In this recipe, we will create a chart data region. This chart data region will show the total value of transactions against each customer group. The report will show a summary through the chart, followed by details of the transactions. Creating charts was not possible in the legacy system, while with the new framework it is just a matter of a few clicks and setups, as you will see in this recipe.
Getting ready
This recipe is in continuation to the report developed in the Creating multiple data regions and charts in reports recipe, in this chapter.
How to do it…
A chart data region is created as follows:
- Right-click on the Designs | TransactionDetail node and navigate to Add | Pie or Doughnut Chart.
- Name it as
CustTransPie
. - From the dataset, select the AmountMst field and drop it in the Data node under the chart.
- Set the following properties for the AmountMST control:
- From the dataset select the CustGroup field and drop it in the Series node under the chart:
- Start the preview, and the preview will show the chart followed by the table (The order is based on the position of data regions under the auto design.):
How it works…
Multiple data regions present the capability to offer different representations of data. They create smaller slices of the report that can present the related information in an isolated region. Each data region is attached to a dataset and they are mutually exclusive, except for the parameters. Parameters are shared between the data regions and there is no ability to define parameters per data region.
SSRS supports the following visualizations for data regions through auto design and a broader list through precision design, as discussed in Chapter 6, Beyond Tabular Reports:
- List data regions
- Table data regions
- Matrix data regions
- Chart data regions
Tip
You can also use views as a datasource. Just add a view to the query and then the view is ready to be used as a datasource. Due to huge data normalization done in AX 2012 with DirPartyTable, Financial Dimensions, and so on, using views can make it easier and accurate to retrieve data.