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

Building a report through an external datasource


In this recipe, we will create a report that connects to an Online Transaction Processing (OLTP) datasource and retrieves data through an SQL query. You will learn how to add a generic report datasource that can be used across all reports. The report here will retrieve the employee information from the Adventure Works sample database.

Getting Ready

In order to execute this recipe, you will need the Adventure Works database installed in the SQL server. This is available for free to download from Microsoft at http://technet.microsoft.com/en-us/library/ee873271.aspx.

How to do it…

  1. Open Visual Studio and create a project with the name AdventureWorkDatasoure. This project is created to hold the new report datasource in AX.

  2. In the project, add a new element of type ReportDatasource.

  3. Open ReportDatasource and set the following properties:

    Property

    Value

    Name

    AdventureWorks

    Connection String*

    Server=AX2012R2A;Database=AdventureWorks2008R2;Integrated...