Book Image

Microsoft Dynamics AX 2012 R3 Reporting Cookbook Update

Book Image

Microsoft Dynamics AX 2012 R3 Reporting Cookbook Update

Overview of this book

Table of Contents (17 chapters)
Microsoft Dynamics AX 2012 R3 Reporting Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Adding filters to data regions


This recipe will use the parameters added in the previous recipe and influence the report. From the two parameters added, the Boolean type will be used to show or hide the chart data region while the string type will be used to restrict the data shown in the table data region.

How to do it…

  1. Select the CustTransPie chart data region and open its properties.

  2. In the visible property, key in the following expression. This links the first parameter to control the visibility of the data region:

    =IIF(Parameters!ShowPieChart.Value, True, False)
  3. Navigate to the Filters node of CustTransTable and create a new filter.

  4. In the new filter node, set the following properties:

    Property

    Value

    Name

    CustGroup

    Value

    =1

    Expression

    =IIF((Parameters!CustGroup.Value=Fields!CustGroup.Value),1,0)

  5. The data region displays only the data for which the expression evaluates to 1.

  6. Now that the report is finally over, select Preview and activate the Parameters tab. The parameters that...