Search This Blog

Friday, May 13, 2016

AX-2012 - Developing SSRS reports using an AOT query.

AX-2012 - Developing SSRS reports using an AOT query.

Scenario:-
As part of this tutorial, the report will print a list of customers and their transaction.

Steps:-
1-Open AX and press ctrl+d to open development workspace.
2-Open AOT and Add a new Query named "CustomerTransactionQuery".
3-Expand its data Source Node, Drag "CustTrans" table from tables to the data source.
4-Now expand the field Node and set its "dynamic" property to  "yes".
5-Now Save the Query and compile.
6-Open Visual studio and create a new report project named "CustTransactionReport".

Datasets: Datasets retrieve data from the AOT query. It acts as a bridge between AX and the SSRS report. Only the fields added in the datasets can be used in a report.
Designs: It defines the layout of the report.
Images: It contains the images that you want to display in the SSRS report.
Data Methods: It contains the business logic which can then be used in the report.
Parameters: It is used to apply filtering to the data in a report.

7-Add new Dataset named "CustTransaction",navigate to the property of the dataset and
press on Query.
8-Select the query from open diolog.
9-Select the fields you want to display in the report and press OK.

There are two types of designs that can be created in a SSRS report:
-Auto Design:
Visual studio automatically creates a design based on the dataset provided. Auto design is the preferred method because it is easy and usually fulfills the requirements for the majority of scenarios.

-Precision Design: It is used when you need custom placement of fields or the layout of the report is too complex.

In this demo we will use Precision Design:-


1- Navigate to Designs node and add new precision design named "Report".
2- Navigate to report node and press edit and you can design the layout as required.
3-then save and deploy the project from Solution explorer.

4-To open the report in AX, a menu item is required. Create a menu item that will open the report from AX.


 
 5-Set the object type property to "SSRSReport" ,Object :CustTranasctionReport

6-Navigate to menu item and press ctrl+O to open the report



 7-Click on ok to run the preview


No comments:

Post a Comment