Chapter 2: SQL Server Reporting Services: Objectives
Chapter 2: SQL Server Reporting Services: Objectives
Chapter 2: SQL Server Reporting Services: Objectives
Introduction
SQL Server Reporting Services (SSRS) is the primary framework for developing reports in Microsoft Dynamics AX 2012. The installation requirements include completing tasks such as verifying prerequisite components are installed, completing the installation setup wizard and deploying default reports. With SSRS, users can develop and deploy reports and integrate reports with Microsoft Dynamics AX 2012.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
2-1
2-2
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
All the standard reports that are provided with Microsoft Dynamics AX 2012 use the SSRS reporting framework. When you upgrade from an earlier version of Microsoft Dynamics AX, legacy reports and cubes are not upgraded. Reports that use the X++ reporting framework and existing SQL Server Reporting Services reports will be copied to the Microsoft Dynamics AX 2012 system. However, they will not be upgraded.
Installation
Microsoft SQL Server Reporting Services (SSRS) is installed as part of the SQL Server installation. Microsoft Dynamics AX 2012 employs Reporting Services Extensions to make use of SSRS capabilities. The Reporting Services Extensions are installed and configured as part of the Business Intelligence installation during the Microsoft Dynamics AX 2012 installation. Refer to the Microsoft Dynamics AX 2012 Installation Guide for more information. The Business Intelligence components can be installed separately if they were not installed during the Microsoft Dynamics AX 2012 installation.
Prerequisites
Before you install the Business Intelligence components, check that the prerequisites are met. Run the Microsoft Dynamics AX prerequisite validation utility to determine whether a computer meets the requirements to install a Microsoft Dynamics AX component. Specific requirements for installing Reporting Services extensions include the following: Microsoft SQL Server 2008 Reporting Services Microsoft SQL Server 2008 R2, Cumulative Update 3 or a later version Windows PowerShell 2.0
Refer to the Microsoft Dynamics AX 2012 System Requirements document for more information. To install the Reporting Services Extensions, you must be a member of the System administrator role in Microsoft Dynamics AX. Reporting Services extensions must be installed on the computer that is running SSRS.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
2-3
If the default reports are not deployed during the installation, they can be deployed later using Windows PowerShell.
2-4
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
2-5
Other objects in the AOT are used to manage application processes and for various other functions. When you develop a report, objects from the AOT will be used to access data and to display the reports.
Visual Studio
Microsoft Visual Studio is an integrated development environment that is used to develop applications. Development in Visual Studio can be done using Visual Basic, Visual C#, Visual C++, and other programming languages. Whereas many development tasks in Microsoft Dynamics AX 2012 can be completed by using X++ in the MorphX development environment or the Visual Studio development environment, report development can only be done in Visual Studio.
2-6
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Application Explorer is a tool in Visual Studio that provides a view into the AOT in Microsoft Dynamics AX. In Application Explorer, you can view and debug X++ code in the AOT. Solution Explorer displays a collection of items for a specific solution. A solution contains one or more projects, and a project contains one or more items. From Solution Explorer, you can open files for editing, add new files to a project, and view solution, project, and item properties.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
2-7
2-8
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Develop Reports
All reports in Microsoft Dynamics AX 2012 are developed by using Visual Studio. Default reports that are installed with Microsoft Dynamics AX 2012 can be customized and new reports can be created by using Visual Studio.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
2-9
To add a new report to the project, select the Project in Solution Explorer in Visual Studio. Right-click the project and select Add > Report. Instead of creating a new Reporting Project, you might want to use an existing, pre-defined Reporting Project. Follow these steps to add an existing Reporting Project from another solution: 1. Select the solution in Solution Explorer in Visual Studio. Right-click the solution and then click Add > Existing Project. 2. Select the reporting project to add, and then click Open.
2-10
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
2-11
Define a Dataset
A report dataset selects data from the data source to be displayed in a report. You can use a query, stored procedure, enum, or a data method to select data. 1. Double-click the report in the project in Visual Studio Solution Explorer to open the report in the Model Editor. 2. In the Model Editor, expand the node for the report that you want to work with. 3. Right-click the Datasets node, and then click Add Dataset. 4. Select the node for the dataset.
2-12
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
a. b. c. d. o o o
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
2-13
2-14
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
2-16
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
2-17
5. To preview the report changes, expand the Designs node for the report. 6. Right-click the design that you want to preview, and then click Preview. After the report is modified in Visual Studio, the report project can be imported back into Microsoft Dynamics AX 2012. Follow the procedure that is described in the "Integrate SSRS with Microsoft Dynamics AX 2012" lesson of this manual to import a Report Project into Microsoft Dynamics AX 2012.
2-18
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Deploy Reports
After a report is developed in Visual Studio, it must be deployed to the SQL Reporting Server to be used. Reports can be deployed from Visual Studio, from the AOT, or by using Windows PowerShell. When a report is deployed, the following occurs: The Report Definition Language (RDL) is uploaded to Reporting Services. The business logic assemblies are copied to the Reporting Services server. Any reports and business logic assemblies that are referenced in the report are verified.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
2-19
2-20
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
2-21
2-22
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
2-23
Challenge Yourself!
Use the provided information to create a query bound report that exposes Customer Transaction data.
2-24
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
2-25
2-26
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
15. In Model Editor, select the CustTransListDS node and drag it onto the Designs node. An auto design named AutoDesign1 is created for the report.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
2-27
2-28
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
5. Right-click the Group on node, and then click Add Group on. 6. Type "AccountNum" as the name. 7. In the Properties window, set the Expression property to "=Fields!AccountNum.Value". 8. In Model Editor, expand the AutoDesign1 node, and then select the AccountNum field under the Data region. 9. Right-click the Group1 node and then click Properties. 10. In the Properties window, expand the Instance Aggregates, and set Render Location to "GroupFooter". 11. Select the AmountMST field under the Data node. 12. In the Properties window, expand the Aggregation item, and set Aggregate Function to "Sum".
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
2-29
2-30
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
2-31
2-32
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Challenge Yourself!
Use the information that is provided in the scenario to develop the report.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
2-33
2-34
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
2-35
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
2-37
2-38
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
Summary
Reports in Microsoft Dynamics AX 2012 are developed using SQL Server Reporting Services and Visual Studio instead of X++. The move to SSRS puts Microsoft Dynamics AX reports on Microsoft's preferred reporting platform providing users professional-looking reports, more export formats, and a more capable report designer.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
2-39
2-40
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
2.
3.
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement
2-41
Solutions
Test Your Knowledge
1. True or False. Reports are not fully-integrated into the Microsoft Dynamics AX security system. ( ) True () False 2. What tool can be used to deploy Microsoft Dynamics AX 2012 reports? (Select all that apply) () Windows PowerShell () Microsoft Dynamics AX 2012 Installation ( ) Microsoft SQL Server Reporting Services () Microsoft Visual Studio 3. True or False. The new Report Data Provider classes let you build reports that use data from an X++ class as the source. () True ( ) False 4. What are some advantages of the new SSRS reporting architecture over X++ reports? (Select all that apply) () Professional-looking reports () More flexible architecture () More supported export formats () Better report designer 5. What are some options for upgrading existing Microsoft Dynamics AX 2009 SQL Server Reporting Services (SSRS) reports? ( ) Rewrite the SSRS report using the X++ reporting framework () Do not upgrade the reports. Use a SQL Server Reporting Services template and customize it to meet your needs. ( ) Deploy the SSRS report using the deployment wizard. ( ) Use the Report Upgrade Tool to upgrade the reports so that they are compatible with the Microsoft Dynamics AX 2012 schema.
2-42
Microsoft Official Training Materials for Microsoft Dynamics Your use of this content is subject to your current services agreement