Book Image

Microsoft Dynamics AX 2012 R3 Reporting Cookbook

Book Image

Microsoft Dynamics AX 2012 R3 Reporting Cookbook

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

Creating reports by fetching the data using maps


Maps unify access to similar columns and methods that are present in multiple tables and views. Maps enable the use of the same field name to access fields with different names in different tables. We will map all the three view fields created in the previous recipe with the map fields.

Getting ready

To work through this recipe, you will need to have AX 2012 R2 or AX 2012 R3 rich clients with developer permission.

How to do it...

  1. Firstly, go to AOT | Data Dictionary | Maps, right-click the node and create a new map named PKTSalesPurchTransferMap.

  2. Add the fields in the map created in the previous step.

  3. Now, we will add all the above created three views in the mapping node of the map and map the fields of view with the fields of maps.

  4. After mapping the fields, we will add a method in the map to insert the data into a temporary table.

    public static void insertTableTmp(
        PKTTmpTable             _pKTTmpTable,
        PKTSalesPurchTransfer   _pKTSalesPurchTransfer...