Microsoft Dynamics AX 2012 Reporting Cookbook - Kamalakannan Elangovan - E-Book

Microsoft Dynamics AX 2012 Reporting Cookbook E-Book

Kamalakannan Elangovan

0,0
39,59 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

Dynamics AX 2012 is a modern ERP solution from Microsoft that is targeted at the mid-and-high-level organizations. It is seeing an increased rate of adoption due to its tighter integration with the Microsoft technology stack and the flexibility it offers.

"Microsoft Dynamics AX 2012 Reporting Cookbook" focuses mainly on the reporting aspects of Microsoft Dynamics AX 2012. Reports play a very central role in an ERP system being accessible to customers, vendors, top management and the shop floor. Every ERP implementation includes reporting changes as companies try to refit the reports to their standards and processes. As a Dynamics AX developer, reporting skills are a must-have and this book intends to make report development easier and simpler.

"Microsoft Dynamics AX 2012 Reporting Cookbook" deals with the SSRS-based reporting framework introduced with Dynamics AX 2012. It explains the reporting model in detail and offers instruction-led examples to help you understand the nuances involved in developing a report.

Throughout this book, you will learn how to build your own reports based on Queries, RDP, and different designs like Auto/Precision designs. You will also gain an understanding of the programmatic flow, which will help you develop reports with confidence. You will find different approaches to debug issues in your reports. The examples offered in this book can be readily used in your real-world scenarios. This book also offers strategies for new reports as well as for migrating your reports from the old reporting framework and development. Report designs like table, matrix, and charts have been discussed with examples. There are also tips, tools and references spread across the book that can hasten your report development process.

Overall, this book will guarantee you a deeper understanding of report development in Dynamics AX.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB
MOBI

Seitenzahl: 261

Veröffentlichungsjahr: 2013

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

Microsoft Dynamics AX 2012 Reporting Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Instant Updates on New Packt Books
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Understanding and Creating Simple SSRS Reports
Introduction
Reporting overview
Using a query as a datasource in a report
Getting ready
How to do it...
How it works...
Creating an auto design from a dataset
Getting ready
How to do it...
How it works...
Grouping in reports
How to do it...
How it works...
Adding ranges to the report
How to do it...
How it works...
Deploying the report
Getting ready
How to do it...
How it works...
See also
Creating a menu item for the report
How to do it...
How it works...
See also
2. Enhancing Your Report – Visualization and Interaction
Introduction
Creating multiple data regions and charts in reports
Getting ready
How to do it…
How it works…
Creating a chart data region
Getting ready
How to do it…
How it works…
Creating a new layout template
How to do it…
How it works…
Expressions in layouts
How to do it…
How it works…
Aggregation in reports
How to do it…
How it works…
Adding an image in auto design
How to do it…
How it works…
See also
Formatting reports
How to do it…
How it works…
Adding unbounded parameters in reports
How to do it…
How it works…
System parameter
User-defined parameters
Bounded Parameters
Unbounded Parameters
Parameters and datasource types
Query parameters
Dynamic filters
See also
Adding filters to data regions
How to do it…
How it works…
Adding a document map navigation to reports
How to do it…
How it works…
Adding a drill up/drill down navigation to reports
How to do it…
How it works…
3. A Report Programming Model
Introduction
Opening a report through a controller
Getting Ready
How to do it...
How it works...
Report programming model
Model
Controller
View
Modifying the report query in the controller
Getting Ready
How to do it...
How it works…
Adding ranges from unbound parameters to the query
How to do it...
How it works…
RDP versus RDL data contract
Modifying the UI by caller
How to do it…
How it works…
Turning off the report dialog
How to do it...
Setting up security for reports
How to do it…
How it works...
Calling multiple reports from a controller
How to do it…
How it works...
Debugging a report model
How to do it…
Making changes to the model and adding new classes
How it works…
Adding data methods in business logic
How to do it...
How it works…
Data methods versus expressions
Adding a URL drill-through action in reports
How to do it...
How it works...
Debugging business logic
How to do it…
How it works…
Unit testing business logic
How to do it…
How it works...
4. Report Programming Model – RDP
Introduction
Creating a simple RDP report
Getting ready
How to do it…
How it works…
Report Data Provider (RDP)
RDP class
RDP data contract
UI builder
Choosing RDP for a report
See Also
Testing the RDP
How to do it…
How it works…
Creating a simple precision design
Getting ready
How to do it…
How it works…
Creating an advanced RDP report
How to do it…
How it works…
Creating a group view report
How to do it…
How it works…
Adding headers and displaying company images
How to do it…
How it works…
Debugging RDP
See Also
Using an existing temp table in RDP
How to do it…
How it works…
Preprocessing reports
How to do it…
How it works…
Clean up
See also
5. Integrating External Datasources
Introduction
Adding a datasource through business logic
Getting ready
How to do it...
How it works…
See also
Using an XML feed as a datasource
Getting ready
How to do it…
How it works…
The spin-off recipes
Building a parameter lookup using business logic
Getting ready
How to do it…
How it works…
Business logic
Building a report through an external datasource
Getting ready
How to do it…
How it works…
Adding a parameter for an external datasource query
Getting ready
How to do it…
How it works…
Creating a customer summary OLAP report
Getting ready
How to do it…
How it works…
See also
Adding a parameter lookup for OLAP
Getting ready
How to do it…
How it works…
Designing an OLAP table report with SQL Report Builder
Getting ready
How to do it…
How it works…
Designing a map subreport with SQL Report Builder
Getting ready
How to do it…
How it works…
Creating a subreport in auto design
Getting ready
How to do it…
How it works…
Creating a subreport in precision design
Getting ready
How to do it…
How it works…
See also
6. Beyond Tabular Reports
Introduction
Creating a matrix report
How to do it…
Basic report design
Creating a matrix report
How it works…
Creating a multicolumn matrix report
Getting ready
How to do it…
How it works…
Creating a column chart report
Getting ready
How to do it…
How it works…
See also
Creating a line chart
Getting ready
How to do it…
How it works…
There's more…
Chart reports in auto design
Gauges in reports
Getting ready
How to do it…
List and rectangle controls in reports
How to do it…
How it works…
Adding reports to the role center
How to do it…
How it works…
7. Upgrading and Analyzing Reports
Introduction
Upgrading a report from the previous version
How to do it...
Defining the datasource
Mapping the parameters and fields
Mapping the design
Datasets in AX 2012 versus AX 2009 reports
Developing the controller
Handling UI events
See also
Analyzing and modifying an existing report
How to do it...
How it works...
Implementing validation in reports
Getting ready
How to do it...
How it works...
Surrogate fields in reports
How to do it...
Surrogate keys in query-based reports
Surrogate keys in RDP
How it works...
Spin-off idea
Grouping and ordering controls in a report dialog
Getting ready
How to do it...
Grouping in the report model
Grouping in the UI builder
Grouping in the contract
How it works...
RDP with multiple temporary tables
Getting ready
How to do it...
How it works...
Multi-value lookup
Getting ready
How to do it...
How it works...
Inventory dimensions in reports
Getting ready
How to do it...
How it works...
Financial dimensions in reports
Financial dimensions in query reports
How to do it...
How it works...
Financial dimensions in RDP reports
How to do it...
How it works...
8. Troubleshooting and Other Advanced Recipes
Introduction
Assessing report performance and usage
Getting ready
How to do it…
How it works…
Handling long running reports in AX
How to do it…
Design-based resolution
Configuration-based resolution
See also
Troubleshooting reports in AX
How to do it…
Deployment-related issues
Unable to deploy
Unable to refresh
Rendering-related issues
Data-related issues
Query-based reports
RDB-based reports
Controller issues
See also
Auto e-mail and Save as file tasks in reports
How to do it…
Saving the report to a file
Sending the report through an e-mail
How it works…
Handling events post report completion
How to do it…
How it works…
Generating and displaying barcodes in reports
How to do it…
How it works…
Hiding controls by context
How to do it…
How it works…
Using AXEnumProvider as the dataset for parameters in reports
Getting ready
How to do it…
Adding a new report design to print management
How to do it…
Deploying language-specific reports to speed up execution time
How to do it…
How it works…
Making your reports function better
How to do it…
A. Introduction to SSRS
Introduction
Why SSRS?
Reporting architecture
The report database
The report server
The Report Manager
Report Definition Language (RDL)
Dynamics AX reporting extensions
Data Processing Extensions (DPE)
Report Definition Extensions (RDE)
AX 2009 versus AX 2012
Development
Understanding AX reports
Artifacts
Reports (AOT\SSRS reports)
Reporting projects (AOT\Visual Studio Projects\Dynamics AX Model Projects)
Report model
Datasets
Design
Auto design
Precision design
Installation and configuration checklist
Components to be installed
Configurations in Dynamics AX
Reporting services configuration manager
Native mode versus SharePoint integrated mode
Index

Microsoft Dynamics AX 2012 Reporting Cookbook

Microsoft Dynamics AX 2012 Reporting Cookbook

Copyright © 2013 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published: September 2013

Production Reference: 1170913

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham B3 2PB, UK.

ISBN 978-1-84968-772-0

www.packtpub.com

Cover Image by Prashant Timappa Shetty (<[email protected]>)

Credits

Author

Kamalakannan Elangovan

Reviewers

Deepak Agarwal

Emad Mokhtar Habib

Umesh Pandit

Nasheet Ahmed Siddiqui

Saptha Wanniarachchi

Acquisition Editor

James Jones

Lead Technical Editor

Amey Varangaonkar

Technical Editors

Iram Malik

Manal Pednekar

Larissa Pinto

Project Coordinator

Apeksha Chitnis

Proofreader

Chris Smith

Indexer

Tejal R. Soni

Graphics

Ronak Dhruv

Production Coordinator

Manu Joseph

Cover Work

Manu Joseph

About the Author

Kamalakannan Elangovan has over eight years of development experience in Dynamics AX. He shares a passion for product development and has pioneered multiple ISV solutions on Dynamics AX. In the past he worked with Innovites to create the first multidimensional ISV solution for cable industries called "Innovites for cable". Building the solution from scratch, he has gained great insights into building, selling, and promoting the product among customers and partners in the Microsoft Ecosystem. You can learn more about him at http://about.me/casperkamal.

He is enthusiastic about sharing his learning with the community which led him to create one of the first few blogs for AX in 2006. It is currently available at http://kamalblogs.wordpress.com. He is active through twitter and the community, popularly by his pseudonym Casperkamal.

First of all, I would like to thank my wife Sangeetha and my little daughter Anu for their considerable support during the long hours I have put behind this book. I also want to apologize for the time I have stolen from them to invest in this book.

Thanks to Dhangar Naveen who has spent considerable hours working along with me in making the examples involved in each recipe.

Special thanks to the wonderful team at Packt who have patiently guided and supported me in making this book a reality.

Also, a big thanks to the readers of my blog, my fellow bloggers, and the Dynamics AX community who have directly and indirectly inspired me in this work.

This book is dedicated to Dick De Jong, who selflessly mentored and trained me in the art of software development.

About the Reviewers

Deepak Agarwal [B.Tech, MBA] is a Technical Consultant and has been working professionally on Dynamics AX since 2011. He is a team member of the very first AX project in the Manufacturing Domain. Though his strengths are rooted in X++ development, he is a highly regarded developer and has solid knowledge of technical aspects of Dynamics AX and X++ reporting.

Deepak blogs on Dynamics AX on his blog http://theaxapta.blogspot.in/.

A big thanks to my dear sister Khushbu Agarwal for her support and understanding of my long hours spent on this work.

Emad Mokhtar Habib is a passionate and an enthusiastic software developer, loves to learn new technologies, and is always seeking for the better to be the best. He has worked with many Microsoft partners. He is builds software to improve and help businesses. He runs a professional and technical blog, EmadMokhtar.com, and shares his thoughts and readings on Twitter and LinkedIn. He is working for Arabesque Group now and as a freelance Web Developer.

I want to thank my lovely wife who helped me in reviewing this book and always took care of me and my environment. I also want to thank my family and friends for motivating me and always pushing me to do my best.

Umesh Pandit is a Techno Functional Consultant with KPIT Cummins Infosystems Ltd. He has done Masters of Computer Applications with first division, having specialization in ERP from Ideal Institute of Technology, Ghaziabad.

He has worked with the top IT giants, such as Google India and Cap Gemini India. He has a deep understanding of ERP systems, such as Microsoft Dynamics AX. He has worked with different versions of Axapta, such as AX 3.0, AX 4.0, AX 5.0 (AX 2009), and AX 6.0 (AX 2012). He has a vast knowledge of Microsoft Technologies, such as SQL, CRM, TFS, Office, Windows Server 2008, Windows Server 2003, Office 365, Microsoft Dynamics NAV, SSRS, SSAS, VSS, and VCS.

I would like to thank my friend Pramila, who encouraged me in this passion.

Nasheet Ahmed Siddiqui has studied Computer Science at the University of Karachi, Pakistan. He has over seven years of consulting experience, playing a variety of roles, including Software Engineer, Senior Software Engineer, Team lead, and Technical Consultant in Dynamics AX and Microsoft technologies.

He started working in 2006 for e-Creatorz, where he was developing and managing web applications. He started his Dynamics AX career with MazikGlobal (a subsidiary of Tyler Technology Ltd, U.S.A and Microsoft Corporation). He was the core developer in the development of the Dynamics AX 2012 and AX 2012 R2 features for Microsoft. He was directly involved with the Microsoft team to build the features for the AX 2012 and AX 2012 R2. Since 2012, he has been working for Othaim Markets, where he is responsible for the customizations, development, and implementation of new verticals (Property Management System and Maintenance Management System).

He has a solid knowledge of and skills in technical aspects of Dynamics AX 2009 and 2012. He is also working as a freelance Dynamics AX Technical Consultant. He has provided development services to many organizations in Pakistan, Saudi Arabia, and Canada. He is also a Microsoft Certified Professional (MCP) for Dynamics AX Development and MorphX Solution Development.

He lives in Riyadh, KSA with his family. He is always happy to share useful AX development tricks on his blog (nasheet.wordpress.com). He can be contacted via LinkedIn at http://sa.linkedin.com/in/nasheet.

Saptha Wanniarachchi is a certified and experienced IT professional from Sri Lanka with quite extensive professional experience, in particular with Microsoft Dynamics-based Business Solutions. She is currently employed with SML, Sri Lanka, an international global branding and packaging company. She takes particular pride in her ability in infrastructure design and implementations for Microsoft Dynamics AX/NAV ERP Systems, system automation, and CRM solutions.

She has worked on the book:

Microsoft Dynamics AX 2012 Security How-To

www.PacktPub.com

Support files, eBooks, discount offers and more

You might want to visit www.PacktPub.com for support files and downloads related to your book.

Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at <[email protected]> for more details.

At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.

http://PacktLib.PacktPub.com

Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books.

Why Subscribe?

Fully searchable across every book published by PacktCopy and paste, print and bookmark contentOn demand and accessible via web browser

Free Access for Packt account holders

If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access.

Instant Updates on New Packt Books

Get notified! Find out when new books are published by following @PacktEnterprise on Twitter, or the Packt Enterprise Facebook page.

Preface

Reporting capabilities are the turn-key decision makers for choosing an ERP system. They cater from the low-level shop floor users to the board room members giving them the right insight into their business. That is one of the many reasons why report customizations dominate at customer implementations. Strengthening your reporting capabilities as a Developer not just makes you but also the users of your report confident than ever.

Microsoft Dynamics AX 2012 is a phenomenal release that took AX to a different breadth and depth. The SSRS has brought in huge thrust to the leap forward. This book has been written to help you understand and acquire the skills necessary to be good at Reporting based on SSRS.

What this book covers

Chapter 1, Understanding and Creating Simple SSRS Reports, walks you through creating a basic report that introduces you to several basic features of Dynamics AX reports.

Chapter 2, Enhancing Your Report – Visualization and Interaction, focuses on further controlling and improving your report through parameters, data regions, expressions, new report and style templates.

Chapter 3, A Report Programming Model, helps you in understanding the programmatic model of the reporting framework inside AX and introduces you to programmatically modifying report UI and validations.

Chapter 4, Report Programming Model – RDP, delves into creating advanced reports using the new report data contract framework. It also details how to design reports through Precision Design.

Chapter 5, Integrating External Datasources, showcases how reports can be extended beyond AX to include other data sources, such as Cubes, XML Cloud Service, or through the integrations framework.

Chapter 6, Beyond Tabular Reports, dives in to using the other types of report formats, such as chart and matrix reports. It further details the use of other interesting controls, such as gauges, lists, and rectangles with clearly drafted examples.

Chapter 7, Upgrading and Analyzing Reports, shows you the approach to adopt when moving reports from MorphX-based reports to SSRS and discusses several repeated customization patterns in reports.

Chapter 8, Troubleshooting and Other Advanced Recipes, is a collection of assorted topics that can be applied to your SSRS reports, such as deploying through your code, using Enum provider and localization of reports. This chapter also introduces you to the log viewer through which you can analyze and identify report usage, report logs, and more.

Appendix, Introduction to SSRS, will help you run through the basic architecture of AX SSRS, followed by a brief introduction to different reporting components and the comparative advantage over the legacy reporting system from the previous releases of Dynamics AX.

What you need for this book

To practice the content in this book, you need the following software:

Microsoft Dynamics AX 2012SQL Server Reporting ServicesSQL Server Analysis ServicesMicrosoft Visual Studio 2010

Alternatively, you can use the Virtual Image available for Microsoft Dynamics AX 2012/AX 2012 R2 through Microsoft Learning Download Center.

Who this book is for

This book aims at IT administrators looking to get their hands on to develop their own reports for their internal demands and for X++ developers who want to deepen their understanding of SSRS reports.

This book requires some basic knowledge of Microsoft Dynamics AX 2012, X++, and MorphX. Some examples are based on C# and .NET. However, they are not must to read this book.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to <[email protected]>, and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the erratasubmissionform link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at <[email protected]> with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at <[email protected]> if you are having a problem with any aspect of the book, and we will do our best to address it.

Chapter 1. Understanding and Creating Simple SSRS Reports

This chapter will cover the following topics:

Using a query as a datasource in a reportCreating an auto design from a datasetGrouping in reportsAdding ranges to the reportDeploying the reportCreating a menu item for the report

Introduction

Reports are the key to any business process. A successful ERP implementation is gauged by the efficient reports that can be generated through the data present in the system. Reports are introspective tools that help top-level business users to asses the condition of their business and help them make critical decisions.

This chapter will help you understand the development artifacts related to reports development, by designing a simple report which is broken down into smaller recipes. We will design a report that is applied with simple formatting capabilities and then deployed to the server to make it available for the end users, after which it is made accessible inside the rich client.

Reporting overview

Dynamics AX 2012 has extensive reporting capabilities like Excel, Word, PowerPivot, Management Reporter, and most importantly the SSRS reports. While there are many methodologies to generate reports, SSRS remains the prominent way to generate analytical and transactional reports. SSRS reports were initially integrated in AX 2009 and today it has replaced the legacy reporting system with AX 2012.

Through the recipes in this chapter, we will build the released products report. The released products report will list all the released products under each item group. This report will use the query datasource to fetch data from Dynamics AX and subsequently create an auto design based report. This report will then be deployed to the reporting services and will be attached to a menu item in AX so that it can be displayed inside the rich client.

Using a query as a datasource in a report

A query is the simplest way to fetch data for a report. Queries are beneficial as they are reusable and are easy to design. This recipe will guide you in creating a query in the AOT with the necessary optimization for a report datasource. The later part will guide you through creating a Visual Studio project for report development and use the query created to create a report datasource.

Getting ready

To work through this recipe, AX 2012 or AX 2012 R2 rich client with developer permission is required.

How to do it...

You can use a query as a datasource in the report, as follows:

Open the AX Development Workspace.Navigate to AOT | Queries, right-click and select New Query.Rename the query to PKTReleasedProducts.Go to the query's datasource node, right-click and select New Data Source.Rename the datasource to InventTable and set the Table property Table to InventTable.There are two steps to select fields from InventTable.Go to the Fields node under the InventTable datasource and set the Dynamic property to Yes. This will automatically add all the fields in the InventTable to the query. Now set the property back to No. This is an easy way to add fields to the query node, alternatively, the property can be kept No and the fields can be dragged-and-dropped from the actual table.Drop all fields except Item, ItemType, and Namealias. This optimizes the query and consequently the fetch time:Save the query.Open Visual Studio.Navigate to File | New | Project.In the new project dialog, click on Microsoft Dynamics AX and then Report Model.Set the name as PKTReleasedProducts:Now right-click on the project and click on Add PKTRelasedProducts to AOT.On the reporting model, right-click, select Add and choose Report.Rename the report as PKTReleasedProductsReport.Go to the Datasets node and right-click on Add Dataset:Name the dataset as Products.Right-click on the dataset and open the properties. Click on the ellipsis (…) button in the query. This opens a dialog with all queries in AOT:Select the query that was created for the report PKTReleasedProducts and click on Next:Select All Fields, since we dropped all the unwanted fields during the creation of the query.Go to the All Display Methods node and select the inventUnitId, itemGroupId, and itemName methods and click on OK.This will generate the fields list for the dataset. This completes the addition of the dataset to the report.

How it works...

Connecting VS to AX: When creating a new report project in Visual Studio, if there is no option such as Microsoft Dynamics AX then ensure that you have your reporting extensions installed. When you have multiple instances of Dynamics AX installed, the Visual Studio identifies the instance to connect from the client configuration. The active client configuration is used to establish the connection. The layer in which the report must be created is also fetched from the client configuration.

Metadata and data retrieval: With AX 2012, WCF-based system services have been introduced. This includes the metadata service, query service, and user session service. SSRS reporting extension uses the query and metadata services. The metadata service helps the report designer in Visual Studio to retrieve the metadata information of query, tables, and EDT while the query service is used to fetch the data.

Verify the query: In case of a complex query, a better approach would be validating the query before it is included in the report. Write a job in Dynamics AX that will use the query to retrieve the data and print the values to the infolog. This will help in nailing the problem when there is an issue with the report.

No Joins: The report supports multiple datasets but as in AX forms, these datasets cannot be joined and they remain independent.

Creating an auto design from a dataset

In this recipe, we will use the data set added in the previous recipe to create a simple auto design that will list all the items.

Getting ready

To develop reports using AX 2012 and AX 2012 R2, you need access to the rich client with development permission, a Visual Studio installation for report development, and the reporting extensions for Dynamics AX must be installed.

The SQL reporting services must be installed and running. You must have the permission to deploy the reports to the reporting server and must be able to access the reporting manager that lists all the reports in the system.

How to do it...

You can create an auto design from a dataset, as follows:

Right-click on the Designs node, select Add and then Auto Design. This creates a new auto design and name it as Released Products.On the Properties node, set the property layout to ReportLayoutStyleTemplate.Set the title property to Released Products:Right-click on the new Released Product auto design node, navigate to Add | Table:Set the following properties:Notice that the fields have been added to the table design automatically.Right-click on the Auto design and select Preview. This will show a preview of the report:

How it works...