Book Image

Developing SSRS Reports for Dynamics AX

By : Mukesh Hirwani
Book Image

Developing SSRS Reports for Dynamics AX

By: Mukesh Hirwani

Overview of this book

<p>SQL Server Reporting Services is the primary reporting platform for Microsoft Dynamics AX. Nowadays every business demands reports ranging from showing an aggregate view of their business performance to the transactional data formatted in a way that can be easily filtered, printed, and emailed. SQL Server Reporting Services allows you to do all this and more, quickly and easily.</p> <p>Developing SSRS Reports for Dynamics AX 2012 covers all the technical aspects of AX 2012 reporting, taking you through various step-by-step guides to quickly develop reports. It encapsulates various real-time scenarios and walkthroughs which will guide you step-by-step to develop reports. You will then go on to learn about various performance-related measures to help you develop or customize reports for Dynamics AX 2012 more efficiently.</p> <p>Developing SSRS Reports for Dynamics AX 2012 is completely based on Microsoft Dynamics AX 2012 report development. Developing SSRS Reports for Dynamics AX has been written in a way to make reporting complex components quicker and easier. You will come across day-to-day scenarios to perform report development.</p> <p>Learn various mechanisms of developing reports in Visual Studio for Dynamics AX 2012. Develop reports using various types of data sources like AOT Query, external data source, and Report Data Provider class. You will also learn various performance enhancement techniques that will help you to manage complex reporting requirements.</p>
Table of Contents (17 chapters)
Developing SSRS Reports for Dynamics AX
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Common SSRS Expressions
Index

Preface

Businesses these days are growing rapidly, and every entity works on data, which is presented in a specific format so that strong decisions can be taken, or a real-time picture of the business can be seen. Higher managements seek for high-end reports, where data is aggregated and presented in the form of charts where they can easily compare their net margins, sales, and other aspects whereas the core departments require reports where they can analyze data at a micro level. Also, while presenting data to each end user, a hierarchy of security levels should be applied so that only the authenticated data owners can see their reports.

This increases a big need for a good reporting tool, which has the capability to deliver all reports required for the business, ranging from high-end aggregated data to transactional data, all in real time.

The Microsoft Dynamics AX 2012 Reporting framework was designed for all such kind of requirements. Reporting inside AX 2012 has been pretty strong which allows analyzing any kind of data with a minimal number of clicks. It also provides a development framework which any developer/administrator can develop or manage various reports inside AX.

In this book, we will take a close look at all the features of Microsoft Dynamics AX 2012 Reporting, and we will develop various reports using step-by-step walkthroughs which will boost your confidence about reporting in AX 2012.

What this book covers

Chapter 1, Developing a Simple SSRS Report in Visual Studio, covers AX reporting basics, common SSRS terms, walkthroughs for developing simple SSRS reports, and the drill-through report.

Chapter 2, Developing Advanced Reports in Visual Studio, describes the common SSRS reporting tools, walkthroughs for creating a Matrix report and a Chart report.

Chapter 3, Developing a Report from an External Data Source, covers a walkthrough about how to build reports which connect to the external database inside AX.

Chapter 4, Importing Reports from Visual Studio to AX and Report Deployment, deals with various topics, such as how to add new/existing reports to the report project in Visual Studio and saving to AOT. It also explains about various methods of deploying reports to the Report Server.

Chapter 5, Using Controller and User Interface Builder Classes, provides knowledge about the Model-View-Controller pattern which is used for the AX reporting framework. It also explains about implementing the Controller and UI Builder classes to build reports.

Chapter 6, Developing Reports Using RDP and Report Contracts, covers Report data provider (RDP) and Report contracts. It explains how we can implement these classes for our reporting needs. You can easily learn the same by following the step-by-step walkthroughs provided.

Chapter 7, Customizing Existing Microsoft Dynamics AX Reports Using Visual Studio, explains how to customize existing reports using Visual Studio, you will get to learn about real-world problems of editing default reports.

Appendix A, Common SSRS Expressions, covers various SSRS expressions like String, Date, Format, and Global functions, which are often required at the time of the report development.

Appendix B, Common Standard AX Classes and Methods, covers various topics about all the Reporting classes and methods which are commonly used during report development.

Appendix C, Reporting Best Practices, deals with various best practices and design constraints, which should be kept in mind during report development. You will be able to learn about all the Do's and Don'ts for the Reporting table, the RDP class, the Contract class, the Controller class, the UI Builder class, report design, and AOT queries.

What you need for this book

All walkthroughs and exercises explained in this book were implemented on Microsoft Dynamics AX 2012 R2 Virtual Machine, which can be downloaded from the following link:

http://blogs.technet.com/b/dutchpts/archive/2012/12/23/microsoft-dynamics-ax-2012-r2-demo-vm-available.aspx

The following is the list of software components which were used to implement walkthroughs explained in this book:

  • Microsoft Dynamics AX 2012 (Kernel version: 6.2.158.0, Application version: 6.2.158.0)

  • Microsoft Visual Studio 2010 (Version: 10.0.40219.1 SP1Rel)

  • Microsoft .NET Framework (Version: 4.5.50709 SP1Rel)

  • Microsoft Windows Server 2008 R2 Enterprise (Service Pack 1)

  • Microsoft Internet Explorer 9

Who this book is for

This book is great for developers and administrators who deal with Microsoft Dynamics AX 2012 Reporting in day-to-day scenarios. It assumes that you don't have any exposure to Dynamics AX 2012 reporting and will teach you from basic to advance level using real-time scenarios. It also mentions a few administrative tasks, which will help you manage reports. Readers must know about the AX architecture, AOT, basic X++ skills, and basics of SSRS.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: Rename Sorting to AccountNum and SortBy to Fields!AccountNum.Value under properties.

A block of code is set as follows:

[DataMemberAttribute("FromDate")]
public FromDate parmFromDate(FromDate _fromDate = fromDate){
  fromDate = _fromDate;
  return fromDate;
}

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

[SRSReportParameterAttribute(classstr(SrsContractSample))]
class SrsRDPSample extends SRSReportDataProviderBase{
  CustTransTotalSales custTransTotalSales;
}

Any command-line input or output is written as follows:

Publish-AXReport -ReportName SalesCustomerChart
  1. New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: Create an Output menu item by right clicking AOT | Menu Items | Output | New menu item.

  2. Information appears like below:

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

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 , 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 errata submission form 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 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 if you are having a problem with any aspect of the book, and we will do our best to address it.