SSRS:How to create SSRS Reports using AOT Query & Auto design in Ax 2012

OverView:
There are multiple ways to develop SSRS reports in Dynamics AX. This tutorial will guide you through the process of developing SSRS reports using an AOT query and auto design.
Pre-requisites
  1. Microsoft Dynamics AX 2012
  2. Visual studio 2012
  3. SQL Server report server must be configured
  4. Reporting services extensions must be installed in Dynamics AX
Steps
  1. First of all we need an AOT query which will fetch data from AX and display it in a report. For this tutorial, I am using an existing query in AX which displays a list of customers.
  2. CustTableListPage query will be used in this tutorial. To find this query, open AOT àQueriesàCustTableListPage.
  3. The development of the SSRS report is done in Visual studio. So a new project needs to be created in Visual studio.
  4. Open Visual studio. Go to File à New à Project.
  5. In the section Installed templates select Microsoft Dynamics AX and then select Report Model in the right pane. Name the project “QueryBasedDemo“. Press OK.

Table Inheritance In Microsoft Dynamics Ax 2012

Table Inheritance :

  • A table can extend from or derive from another table. Each table has the SupportInheritance property and the Extends property, which together control table inheritance.
  • The default for each new table is to implicitly extend from the Common table. The extension from the Common table cannot be set or seen in the Extends property. A variable that is declared of a specific table also implicitly inherits methods from the xRecord class.
  • In the terminology for table inheritance, we say that the derived table extends its base table. But we never use the terms parent or child to explain tables in an inheritance relationship. The terms parent and child can be used to describe foreign key relationships between tables.
  • In Microsoft Dynamics AX, a table can inherit from another table. The AOT node for each table has the Extends property which you can use to derive your table from a table that you specify. 

Table inheritance is mainly controlled by the following properties:

  1. SupportInheritance – specifies if a table is a part of a hierarchy.
  2. InstanceRelationType – specifies the field that is used as a type discriminator. TableIds of concrete types are used as values of the InstanceRelationType field.
  3. Abstact – specifies if a table is abstract. Tables without derived tables cannot be abstract.
  4. Extends – specifies table’s parent.

Difference Between LinkType and JoinType in Dynamics Ax 2012

Hi Everyone today i would like share information on Link types and Join Types. 
  • Link type is a property of the form data source. We can add more than one tables as a data source to the form.
  • Those data sources should have the table level relation, So, that the developer don't need to work on the coding part to find the related records. 
For example, if we create the order form, that order form has orders and orderdetails tables as form data sources. We can add both tables as a data sources to the form.

Link Type:

  •  Active:  Parent and child- data source is updated immediately when a new record in the parent data source is selected. Continuous updates consume lots of resources consuming.

CrossCompany Vs ChangeCompany In Dynamics Ax 2012

Hi Everyone today i would like share information regarding how to retrieve data from Selected companies or from a specified company by using Keywords known as CrossCompany and ChangeCompany in Dynamics Ax, with a simple example.  

CrossCompany :  By using this keyword we can retrieve data from multiple selected companies or from all companies.
Example:-  We'll be using the well known demo data table (i.e, CustTable).

                    CustTable                 custTable;
                    Container                  con;
                 // Assigning the required Companies to the container 
                    con = ["CEU","DAT","CEE"];
                // CrossCompany:Object is the syntax for using CrossCompany keyword
                    Select crosscompany:con custTable;
                    
info( strfmt("%1",custTable.accountnum));

ChangeCompany : By using this keyword we can change company any time and retrieve data from specific companies. 

For Easy Understanding: Let say i'm in the CEU Company and i would like to get the data belonging to the CEE Company. Then i would Prefer to Use ChangeCompany Keyword.

Example:-
                    CustTable                 custTable;
                    Select * from custTable;
                    
info( strfmt("%1",custTable.accountnum));
//Accessing the data from a specified company by using the ChangeCompany Keyword
// changecompany("Company Name")  is the Syntax for ChangeCompany Keyword.
                    changecompany("CEE")
                    {
                        
custTable = null
                        Select * from 
custTable;
                        
info( strfmt("%1",custTable.accountnum));
                     }
// Retrieving from another selected Company
                    changecompany("CEEU")
                    {
                         
custTable = null
                         Select * from 
custTable;
                         
info( strfmt("%1",custTable.accountnum));
                     }                    

Proud To Be a DAX Developer :-)