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

Surrogate fields in reports


The feature of surrogate keys that was introduced with AX 2012 is powerful, but at times creates ambiguity on their usage. A surrogate key is a key whose value has no meaning to people. A large number generated by the system, such as Recid, could be a surrogate key. The goal of this recipe is to clarify and showcase examples that use surrogate keys in possible patterns. This recipe is divided into two sections: the first section will discuss the usage of surrogate keys in a query-based report, followed by the section that details their application in RDP-based reports.

How to do it…

  1. To implement this recipe, we will use the example of student and student marks tables. Create these tables and relate the student marks table to the student table with the surrogate key. For the student table, add Student Id as a replacement key in the table properties.

  2. Create the surrogate key by creating a new relation in the student marks table and then using the option New | Foreign...