Microsoft Dynamics AX 2012 R3 Reporting Cookbook
By Deepak Agarwal and Chhavi Aggarwal
()
About this ebook
- Easy and effortless deployment of SSRS reports
- One stop solution for developers to customize existing SSRS reports in Dynamics AX R3
- Step-by-step tutorial with solutions to writing unit classes for reports
Microsoft Dynamics AX 2012 R3 Reporting Cookbook is recommended for Dynamics AX developers and .NET-based SSRS developers looking to familiarize themselves with the new AX reporting framework.
Related to Microsoft Dynamics AX 2012 R3 Reporting Cookbook
Related ebooks
Microsoft Dynamics AX 2012 Reporting Cookbook Rating: 0 out of 5 stars0 ratingsExtending Microsoft Dynamics AX 2012 Cookbook Rating: 0 out of 5 stars0 ratingsMicrosoft Dynamics GP 2016 Cookbook Rating: 0 out of 5 stars0 ratingsSQL Server 2016 Reporting Services Cookbook Rating: 5 out of 5 stars5/5QlikView for Developers Cookbook Rating: 0 out of 5 stars0 ratingsMicrosoft Dynamics AX 2009 Development Cookbook Rating: 0 out of 5 stars0 ratingsOData Programming Cookbook for .NET Developers Rating: 0 out of 5 stars0 ratingsApplied Architecture Patterns on the Microsoft Platform Rating: 0 out of 5 stars0 ratingsMicrosoft Windows Azure Development Cookbook Rating: 5 out of 5 stars5/5Microsoft Visio 2010 Business Process Diagramming and Validation Rating: 0 out of 5 stars0 ratingsMicrosoft Dynamics CRM 2011: Dashboards Cookbook Rating: 0 out of 5 stars0 ratingsBuilding Dashboards with Microsoft Dynamics GP 2016 - Second Edition Rating: 0 out of 5 stars0 ratingsAccounting Database Design Rating: 5 out of 5 stars5/5Professional Microsoft SQL Server 2016 Reporting Services and Mobile Reports Rating: 0 out of 5 stars0 ratingsBizTalk Server 2010 Cookbook Rating: 0 out of 5 stars0 ratingsMicrosoft Exchange 2013 Cookbook Rating: 0 out of 5 stars0 ratingsTabular Modeling with SQL Server 2016 Analysis Services Cookbook Rating: 4 out of 5 stars4/5Microsoft Dynamics NAV Administration Rating: 0 out of 5 stars0 ratingsMastering Microsoft Dynamics NAV 2016 Rating: 4 out of 5 stars4/5Microsoft Dynamics AX 2012 R3 Security Rating: 0 out of 5 stars0 ratingsMicrosoft Dynamics AX Complete Self-Assessment Guide Rating: 0 out of 5 stars0 ratingsExtending Microsoft Dynamics 365 for Operations Cookbook Rating: 5 out of 5 stars5/5Microsoft Azure SQL Data Warehouse A Complete Guide Rating: 1 out of 5 stars1/5Programming Microsoft Dynamics® NAV 2013 Rating: 0 out of 5 stars0 ratingsDynamics 365 A Complete Guide - 2021 Edition Rating: 0 out of 5 stars0 ratingsMicrosoft Dynamics AX 2012 R3 Financial Management Rating: 5 out of 5 stars5/5Machine Learning with Dynamics 365 and Power Platform: The Ultimate Guide to Apply Predictive Analytics Rating: 0 out of 5 stars0 ratingsMicrosoft Dynamics AX 2009 Administration Rating: 0 out of 5 stars0 ratings
Software Development & Engineering For You
Python For Dummies Rating: 4 out of 5 stars4/5How to Write Effective Emails at Work Rating: 4 out of 5 stars4/5Learning Python Rating: 5 out of 5 stars5/5Grokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5Hand Lettering on the iPad with Procreate: Ideas and Lessons for Modern and Vintage Lettering Rating: 4 out of 5 stars4/5Beginning C++ Programming Rating: 3 out of 5 stars3/5Adobe Illustrator CC For Dummies Rating: 5 out of 5 stars5/5iOS App Development For Dummies Rating: 0 out of 5 stars0 ratingsLevel Up! The Guide to Great Video Game Design Rating: 4 out of 5 stars4/5Tiny Python Projects: Learn coding and testing with puzzles and games Rating: 5 out of 5 stars5/5Ry's Git Tutorial Rating: 0 out of 5 stars0 ratingsLearn to Code. Get a Job. The Ultimate Guide to Learning and Getting Hired as a Developer. Rating: 5 out of 5 stars5/5Lua Game Development Cookbook Rating: 0 out of 5 stars0 ratings27 PROGRAM MANAGEMENT INTERVIEW TECHNIQUES - To Ace That Dream Job Offer ! Rating: 5 out of 5 stars5/5Reversing: Secrets of Reverse Engineering Rating: 4 out of 5 stars4/5Coding All-in-One For Dummies Rating: 0 out of 5 stars0 ratingsRESTful API Design - Best Practices in API Design with REST: API-University Series, #3 Rating: 5 out of 5 stars5/5PYTHON: Practical Python Programming For Beginners & Experts With Hands-on Project Rating: 5 out of 5 stars5/5Good Code, Bad Code: Think like a software engineer Rating: 5 out of 5 stars5/5Beginning Programming For Dummies Rating: 4 out of 5 stars4/5Engineering Management for the Rest of Us Rating: 5 out of 5 stars5/5Modern C++ for Absolute Beginners: A Friendly Introduction to C++ Programming Language and C++11 to C++20 Standards Rating: 0 out of 5 stars0 ratingsiPhone Application Development For Dummies Rating: 4 out of 5 stars4/5DevOps For Dummies Rating: 4 out of 5 stars4/5Android App Development For Dummies Rating: 0 out of 5 stars0 ratingsHow Do I Do That in Photoshop?: The Quickest Ways to Do the Things You Want to Do, Right Now! Rating: 4 out of 5 stars4/5OneNote: The Ultimate Guide on How to Use Microsoft OneNote for Getting Things Done Rating: 1 out of 5 stars1/5
Reviews for Microsoft Dynamics AX 2012 R3 Reporting Cookbook
0 ratings0 reviews
Book preview
Microsoft Dynamics AX 2012 R3 Reporting Cookbook - Deepak Agarwal
Table of Contents
Microsoft Dynamics AX 2012 R3 Reporting Cookbook
Credits
About the Authors
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
Sections
Getting ready
How to do it…
How it works…
There's more…
See also
Conventions
Reader feedback
Customer support
Errata
Piracy
Questions
1. Understanding and Creating Simple SSRS Reports
Introduction
Reporting overview
Using a query as a data source in a report
Getting ready
How to do it...
How it works…
Connecting VS to AX
Retrieving metadata and data
Verify the query
No joins
Creating auto designs from datasets
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 a report
Getting ready
How to do it...
Location of deployment
How it works
Creating a menu item for a report
How to do it...
How it works…
Creating a report using a query in Warehouse Management
Getting ready
How to do it...
How it works
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…
Expression in reports
How to do it…
How it works…
Understanding prefix symbols in simple expressions
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 data source types
Query parameters
Dynamic filters
See also
Adding filters to data regions
How to do it…
How it works…
Adding document map navigation to reports
How to do it…
How it works…
Creating drill-up/drill-down actions in reports
How to do it…
How it works…
3. Report Programming Model
Introduction
Opening a report through a controller
Getting Ready
How to do it...
How it works...
Report programming model
Model
Controller
Report data contract
Report controller
Report UI builder
View
Modifying the report query in controller
Getting Ready
How to do it...
How it works...
Opening a report with a dialog
How to do it...
How it works…
Creating a report using the UI Builder class
Getting Ready
How to do it...
How it works…
Adding a lookup on a report dialog using the UI Builder class
Getting Ready
How to do it...
How it works…
Connecting the UI builder class with a contract class
Getting Ready
How to do it...
How it works…
Adding ranges from unbound parameters to a query
How to do it...
How it works…
RDP vs RDL data contract
Modifying the UI by caller
How to do it…
How it works…
Turning off a report dialog
How to do it...
Setting up security for reports
How to do it…
How it works...
Adding up the report menu item into privilege
How to do it...
How it works…
Calling multiple reports from a controller
How to do it…
How it works...
Calling multiple reports simultaneously using a single controller
How to do it...
How it works…
Debugging a report model
How to do it…
Changes to model and adding new classes
How it works…
Adding data methods in business logic
How to do it…
How it works...
Data method vs 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...
Creating a report using a controller and the UI Builder class
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…
RDP
RDP class
RDP data contract
UI builder
Choosing RDP for a report
See Also
Testing the RDP report
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…
Testing the RDP
How it works…
Creating a report with multiple data sources in a single table
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…
Pre-processing reports
How to do it…
How it works…
Clean up
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…
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…
Company parameter
EndDate parameter
Main query
Designing an OLAP table report with SQL Report Builder
Getting Ready
How to do it…
How it works...
Designing a map sub-report with SQL Report Builder
Getting Ready
How to do it
How it works...
Creating a sub-report in auto design
Getting Ready
How to do it...
How it works...
Creating a sub-report 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 its previous version
How to do it…
Defining the data source
Mapping the parameters and fields
Mapping the design
Datasets in AX 2012 R3 vs AX 2009 reports
Developing the controller
Handling UI events
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 the report dialog
Getting ready
How to do it...
Grouping in report model
Grouping in the UI builder
Grouping in contracts
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 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
Data extension-based timeout
Server-side WCF timeout
Client-side WCF timeout
Report execution timeout
Specifying timeouts for all reports
Specifying timeouts for a specific report
User session timeout
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 report
RDP-based report
Controller issues
Auto e-mail, save as file tasks in reports
How to do it…
Saving the report to a file
Sending the report through e-mail
How it works…
Handling events after 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…
Improving the functionality of reports
How to do it…
9. Developing Reports with Complex Databases
Introduction
Creating reports by fetching the data using complex queries
Getting ready
How to do it…
Creating reports by fetching the data using views
Getting ready
How to do it…
Creating reports by fetching the data using maps
Getting ready
How to do it...
10. Unit Test Class and Best Practices Used for Reports
Introduction
Creating a unit test class for a contract class
Getting ready
How to do it...
Creating a unit test class for a controller class
Getting ready
How to do it...
Creating a unit test class for an RDP class
Getting ready
How to do it...
Best practices for AX 2012 report development
Report design
AOT queries
Data source table
RDP class
Contract class
Controller class
UI Builder class
General best practices
Index
Microsoft Dynamics AX 2012 R3 Reporting Cookbook
Microsoft Dynamics AX 2012 R3 Reporting Cookbook
Copyright © 2015 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 authors, 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
Second edition: March 2015
Production reference: 1240315
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78439-538-4
www.packtpub.com
Credits
Authors
Deepak Agarwal
Chhavi Aggarwal
Kamalakannan Elangovan
Reviewers
Parag Gunwant Chapre
Muhammad Anas Khan
Henrik Marx Larsen
Commissioning Editor
Usha Iyer
Acquisition Editor
Neha Nagwekar
Content Development Editor
Natasha DSouza
Technical Editor
Ankur Ghiye
Copy Editors
Puja Lalwani
Adithi Shetty
Alpha Singh
Trishla Singh
Project Coordinator
Rashi Khivansara
Proofreaders
Simran Bhogal
Maria Gould
Bernadette Watkins
Indexer
Monica Ajmera Mehta
Production Coordinator
Komal Ramchandani
Cover Work
Komal Ramchandani
About the Authors
Deepak Agarwal (Microsoft MVP) is a Microsoft Certified Professional and has been working professionally on Dynamics AX since 2011. He has worked with different versions of Axapta, such as AX 2009, AX 2012, R2, and R3. He has had a wide range of development, consulting, and leading roles, while always maintaining a significant role as a business application developer. Though his strengths are rooted in X++ development, he is a highly regarded developer and has knowledge of technical aspects of Dynamics AX development and customization. He has also worked on base product development with the Microsoft team.
He was awarded the Most Valuable Professional (MVP) on Dynamics AX in 2013 and 2014 by Microsoft.
He has also contributed to the following books:
Microsoft Dynamics AX 2012 Reporting Cookbook
Microsoft Dynamics AX 2012 Programming
Microsoft System Centre Configuration Manager
Deepak shares his experience with Dynamics AX on his blog at http://theaxapta.blogspot.in/.
Sincere thanks to my friend, Himashu, for his motivation and support.
I would also like to thank Mr. Kamalakannan Elangovan, the author of Microsoft Dynamics AX 2012 Reporting Cookbook, Packt Publishing, the earlier version of this book. Thanks to the Packt Publishing team for this great opportunity. It's a privilege to work with you all.
Also, thanks to all the reviewers who invested their time and provided useful feedback, which helped us a lot to make this book more effective and useful.
Chhavi Aggarwal started working on Dynamics AX in 2012. She is a Microsoft Certified Professional and has worked on both the 2009 and 2012 versions of Dynamics AX. She is an expert in SSRS reports and has also done a lot of customization and development in Dynamics AX R2/R3 through X++. She has a very deep knowledge of the technical aspects related to Dynamics AX R2/R3, as well as sound technical and logical skills in customization and development. She has also worked with the Microsoft team for standard base development.
I am grateful to my loving parents for motivating and supporting me through thick and thin. Sincere thanks to Mr. Puneet Agarwal (elder brother) and Mrs. Ankita Agarwal (sister-in-law), in addition to my dearly youngest brother Ankit Aggarwal for being the strongest pillars in my most difficult times.
I offer my immense reverence to the honorable Mr. Kamalakannan Elangovan, the author of the previous version of Microsoft Dynamics AX 2012 Reporting Cookbook, who has always been a great source of inspiration. Also, a special thanks to the Packt Publishing team, who always stood beside us throughout this entire journey.
I am overwhelmed by the invaluable role played by the reviewers for their helpful comments and suggestions.
Kamalakannan Elangovan has over 8 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 has worked with Innovites to create the first multidimensional ISV solution for cable industries called InnoVites for cable
. Building the solution from scratch, he gained great insights into building, selling, and promoting a product among customers and partners in the Microsoft Ecosystem. You can find out more about him at http://about.me/casperkamal.
Kamal is enthusiastic about sharing his learnings 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 on Twitter and is very well known in the community 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 put into this book. I also want to apologize for the time I stole from them to invest in this book.
Thanks to Dhangar Naveen who spent a considerable number of hours working along with me in making the examples involved in each recipe.
Special thanks to the wonderful team at Packt Publishing 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 to create this book.
About the Reviewers
Parag Gunwant Chapre is currently working with Tieto Software Technologies Limited as a senior technical consultant. He completed his BE in CSE from Nagpur University in the year 2008 with first a division. He has over 6 years of experience in MS Dynamics AX 2009/2012 and ASP.NET/C#.NET.
Parag has worked with top MS Dynamics AX companies, such as Systems Advisers Group (SAG Global), Tectura Corporation at Noida, and Tata Consultancy Services in Pune. He has worked on different versions of Axapta, such as AX 2009, AX 2012 R2, and R3.
His work experience includes Windows and web applications, SSRS development, Microsoft Dynamics AX 2009/2012, Application Integration Framework (AIF), Microsoft Dynamics Connector, and MS Dynamics CRM.
He completed his certification in Windows and web application (.NET), Installation and Configuration, Introduction development, and MorphX Solution Development in MS Dynamics AX 2009/2012.
He has received much appreciation from various clients for developing SSRS reports and MS dynamics AX Integration with MS Dynamics CRM.
I would like to thank my parents and sister for their continuous support, guidance, and encouragement.
Special thanks to Rashi and the Packt Publishing team, who provided me with a chance to review this book.
Muhammad Anas Khan is a Microsoft Certified Professional, working as a technical consultant for Microsoft Dynamics AX at MazikGlobal, where he is responsible for delivering consultancy for Dynamics AX implementation projects. His technical expertise includes Application Integration Framework (AIF), forms, SSRS and SSAS reporting, Batch Framework, Role-based Security and custom workflow development.
He has more than 6 years of experience in the software industry, where he held various engineering positions to develop global enterprise systems. His career vision is to frame the right problems and find efficient solutions that deliver value to customers, partners, and shareholders. He has a master's degree in computer science from IBA University and lives with his family in Karachi.
You can find him on LinkedIn at https://www.linkedin.com/in/muhammadanaskhan, and read his Dynamics AX blog at http://dynamicsaxinsight.wordpress.com/.
I would like to thank my family for their continuous support especially my brother, Sohaib Khan, for guiding me well throughout my career.
Special thanks to Rashi and the whole Packt Publishing team for giving me the opportunity to review this book.
Henrik Marx Larsen has been implementing ERP across a number of industries, including wholesales, manufacturing, and financial services since 1994. In 1998, He started working with Microsoft Dynamics AX (formerly known as Damgaard Axapta) as a developer and helped deliver many projects across Europe. In recent years, Henrik Marx Larsen has worked as a Solution Architect on a number of enterprise projects and today is heading international jewelry giant PANDORA's global implementation of Microsoft Dynamics AX. He holds a BSc (Hons) in Computer Science from De Montfort University.
www.PacktPub.com
Support files, eBooks, discount offers, and more
For support files and downloads related to your book, please visit www.PacktPub.com.
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
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.
https://www2.packtpub.com/books/subscription/packtlib
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books.
Why subscribe?
Fully searchable across every book published by Packt
Copy and paste, print, and bookmark content
On demand and accessible via a 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 9 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.