Académique Documents
Professionnel Documents
Culture Documents
Explain the features added for Visual Studio Reporting Tools for
Microsoft Dynamics AX 2012.
Introduction
SQL Server Reporting Services is the primary reporting platform for Microsoft
Dynamics AX 2012. The default, out-of-the-box reports that are provided with
Microsoft Dynamics AX run on the Reporting Services platform. They provide
users with better looking reports, more export formats, and a more capable report
designer. The goals for this transition include:
10-1
Overview
New Reporting Architecture
The SQL Server Reporting Services architecture in Microsoft Dynamics AX
2012 has been modified to follow a Model-View-Controller (MVC) design
pattern variation. This architecture allows many different client types to call
Microsoft Dynamics AX 2012 Reporting Services reports including: Microsoft
Dynamics AX clients, Enterprise Portal, and Batch Job. This also means that
Reporting Services can be replaced by a different application for rendering
reports.
10-2
Upgrade Consideration
Reports and cubes are not upgraded to Microsoft Dynamics AX 2012.
The X++ reporting framework is being deprecated in Microsoft Dynamics AX
2012. Reports based on the X++ reporting framework and existing SQL Server
Reporting Services reports will be copied to the Microsoft Dynamics AX 2012
system, but they will not be upgraded. It is recommended to use a SQL Server
Reporting Services report that is provided with Microsoft Dynamics AX 2012 as
a template and customize it to meet your needs.
Configuration
Previously, you could use the X++ framework to modify the queries used to
retrieve data for reports. In Microsoft Dynamics AX 2012, the Reporting
Services framework is updated and uses the same functionality. This means you
can now filter and sort the data on Reporting Services reports.
Auto-reports
In Microsoft Dynamics AX 2009, you could use the Auto-report wizard to create
customized, ad hoc reports. These reports were based on the X++ reporting
framework. With Microsoft Dynamics AX 2012, you can use the Auto-report
wizard to create customized, ad hoc reports that are based on the SQL Server
Reporting Services framework. To start the Auto-report wizard, click the Print
icon on a form.
Batch Support
SQL Server Reporting Services reports in Microsoft Dynamics AX 2012 can
now be integrated with the Microsoft Dynamics AX batch framework. This
allows you to:
10-3
Development Information
The following features are added to Visual Studio Reporting Tools for Microsoft
Dynamics AX 2012.
Data Binding
Visual Studio Reporting Tools for Microsoft Dynamics AX is now improved to
make binding of data easier and you can build more involved reports.
The IEnumerable<DataRow> interface is now supported as a data method return
type. With the addition of the AxQuery.ExecuteQueryStream method you can
run a query and return a data table with the given results.
The report preview will now limit the return of data to 1000 records by default.
This makes the processing of large amounts of data for the preview more
efficient. To view all the data in the preview of your report, in the Preview
window, click the Load data sets fully link.
The SQL Reporting Services solution for Microsoft Dynamics AX 2012 includes
a new data source type called Report Data Provider (RDP) which you can use to
build reports that have data from an X++ class as the source. You can build
custom business logic to be rendered in reports using predefined X++ classes.
You can also bind parameter elements to Report Definition Language (RDL)
expressions using the expression editor.
10-4
Ability to have the starting and ending values for a column chart
report automatically match the data.
The values that you enter across Visual Studio sessions will be stored and the
auto-complete functionality is activated. Visual Studio Reporting Tools for
Microsoft Dynamics AX will recall the different values entered in a given text
box. A property named Render Grand Total is now added to auto design tables. If
the property is set to True, then the report will calculate and display grand totals
based on the selected aggregation type. You can also customize or turn off the
report summary caption in auto design reports without a single line of code. The
whole solution is manageable by using report design properties.
An end-user can use interactive sorting at run time to sort columns on the
automatically designed report. This differs from static sorting where you build a
specific sort order into the report when you are building it. In interactive sorting,
the end-user can sort by column A and then change the sort to column B.
10-5
Print Management
Microsoft Dynamics is integrated with Windows Print Management to print
Visual Studio reports, and now you can do the following:
Pass parameters
The run user interface and parameters for MorphX reporting are added for Visual
Studio Reporting Tools for Microsoft Dynamics AX.
Print Management API Support
The Application Programming Interfaces (APIs) required by Microsoft Dynamics
AX Print Management are now supported. These APIs, together with added
forms, help end-users to run reports in various formats, and also help developers
manage and run reports.
Cross-reference Tool
You can use the Microsoft Dynamics AX cross-reference system to view the
relationships between objects. The Cross-reference tool is now updated to work
for reports. Like any other object in the AOT, you can right-click Report > Addins > Cross-reference tool > Using, and the data source will be displayed. You
can also select a data source, such as a query in the AOT, and select Used By,
and it will list the report or the reports that use it.
Security
Reports are fully integrated into the Microsoft Dynamics AX security system.
When you secure data that uses tasks and roles, reports automatically respect that
security.
10-6
Other Improvements
Additional improvements include the following:
10-7
10-8
10-9
10-10
In the AOT, right-click the Queries node, and then locate the query.
Right-click the Ranges node and then click New Range.
A default range is created for you by Microsoft Dynamics AX.
Save the query.
In the Model Editor, select the table node.
Right-click the node and select Refresh to reflect changes that are
made to the Microsoft Dynamics AX Query.
Expand the Parameters node to display the list of report parameters.
Right-click the node and select Add > Parameter.
Type a name for the Parameter.
In the Properties window, set the Prompt String property to the
filter field.
In the Model Editor, expand the AutoDesign1 node.
Right-click the Filters node and select Add Filter.
Type a name for the Filter.
10-11
10-12
10-13
10-14
10-15
10-16
10-17
10-18
10-19
10-20
10-21
10-22
/// <summary>
/// Data Contract class for the AOT Objects Reporting
Services report
/// </summary>
/// <remarks>
/// This is the Data Contract class for the AOT Objects
Reporting Services report
/// </remarks>
[DataContractAttribute]
public class AOTObjectsContract
{
Name parentNode;
Name aotProperty;
Name propertyVal;
boolean incNoValue;
}
10-23
10-24
10-25
10-26
10-27
10-28
10-29
10-30
10-31
Summary
In this chapter you learned that in Microsoft Dynamics AX 2012 all X++ reports
are now migrated to SQL Server Reporting Services. This platform provides
users better looking reports, more export formats, and a more capable report
designer.
10-32
10-33
2.
3.
10-34
Solutions
Test Your Knowledge
1. True or False: Reports are not fully-integrated into the Microsoft Dynamics
AX security system.
() FALSE
( ) TRUE
2. Which tool is used to deploy reports in Microsoft Dynamics AX 2012?
() PowerShell
( ) Microsoft Dynamics AX 2012 install files
( ) Microsoft Dynamics AX 2012 Reporting Project Deployment form
3. True or False: You can use the new data type Report data to build reports that
have data from an X++ class as the source.
() TRUE
( ) FALSE
4. What are some advantages of the new Reporting Services architecture over
X++ reports? (Select all that apply)
() Better looking reports
() More flexible architecture
() More supported export formats
() Better report designer
5. What are some of the options for upgrading existing Microsoft Dynamics AX
2009 SQL Server Reporting Services reports? (Select all that apply)
( ) Rewrite the Reporting Services reports using the X++ reporting
framework.
() Do not upgrade the reports, use a Reporting Services template and
customize it to meet your needs.
( ) Deploy the Reporting Services reports and follow the deployment
wizard.
() Use the Report Upgrade Tool to upgrade the reports so that they are
compatible with the Microsoft Dynamics AX 2012 schema.
10-35
10-36