Tuesday, 15 September 2015

Get list of AOT elements(objects) through code in Dynamics AX 2012

How to get list of AOT elements(objects) through code in Dynamics AX ?
Here  is the code:
UtilElements    UtilElementsLocal;
  
while select * from UtilElementsLocal
    where UtilElementsLocal.recordType == UtilElementType::ExtendedType
    && UtilElementsLocal.utilLevel == global::currentAOLayer() 
{
      info(UtilElementsLocal.name) ;
}

How to GAC a DLL when any changes are made in AX 2012

Gac a DLL, when any changes are made in the DLL? 

1. Open Visual studio x64 Win 64 Command prompt----> as administrator.
2. Command : gacutil -i <path-of-dll-with-name> (i-install, u-uninstall).

Ex: gacutil -i C:\Users\Administrator\Desktop\Demo.dll

Thursday, 13 August 2015

Creating a service AIF in Microsoft Dynamics AX 2012

1    1.Create a new service in Services node.
2.       Go the properties of that service node and set the service class that you are intended to.
3.       Now drag and drop the required methods in the operations group of the service node.
4.       Create a new Service Group and add the created service into this group.
5.       Now right click on the newly created service group and deploy it!.
6.       Go to the AX rich client and go to the System Administration module and Click on Service and           Application Integration Framework >> Inbound ports >> refresh the list and you will find your           service here >> now select your service and click “Activate”.

Monday, 3 August 2015

Export a shared/private project through x++ code in Microsoft Dynamics AX 2012

static void exportingtoxpos(Args _args)
{
TreeNode treeNode;
FileIoPermission perm;
#define.ExportFile(@"D:\TestProject.xpo")
#define.ExportMode("w")

perm = new FileIoPermission(#ExportFile, #ExportMode);
if (perm == null)
  {
        return;
  }

perm.assert();

treeNode = TreeNode::findNode(@"\Projects\private\SSRSReports"); //path of project either private                                                                                                                     or shared and project name
if (treeNode != null)
  {
      // BP deviation documented.
      treeNode.treeNodeExport(#ExportFile);
  }

CodeAccessPermission::revertAssert();
}

Tuesday, 28 July 2015

SQL server Reporting Services (SSRS) Architecture for AX 2012


1. User requesta a report :

A menu item in the Microsoft Dynamics AX client may be bound to a report for Reporting Services. After a user clicks the menu item, a parameters form is displayed to the user. The user enters parameters to filter the data that is displayed on the report.
The Microsoft Dynamics AX client then requests the report from an instance of Reporting Services. The request includes the parameters that the user entered.

2.Reporting Services receives the request and requests the report data from the Microsoft Dynamics AX server.

Reporting Services receives the request and examines the report. The report is stored as an .rdl file. The .rdl file indicates the report’s data source. The data source may be a Microsoft Dynamics AX query, a report data provider class, or an external data source that is accessed through report data methods.
If a Microsoft Dynamics AX data source is used for the report, Reporting Services uses the Microsoft Dynamics AX data extension to retrieve the data.

Reporting Services then requests metadata about the data source from Microsoft Dynamics AX. Then Reporting Services requests the data for the report.

3.The Microsoft Dynamics AX server receives the request and sends the report data back to Reporting Services.
The Microsoft Dynamics AX services examine the query in the Application Object Tree (AOT) to return the requested metadata. The services also run the query to generate the data for the report.

Microsoft Dynamics AX then returns the metadata and data to Reporting Services.

4.Reporting Services renders the report and sends it to the Microsoft Dynamics AX client.
The Microsoft Dynamics AX customization extension formats the report. The customization extension uses metadata to provide automatic formatting of data and can affect the positioning and layout of elements on the report.
Reporting Services then renders the report into a visual representation and sends that representation to the Microsoft Dynamics AX client.

5.The report is displayed to the user.
The Microsoft Dynamics AX client displays the report to the user in the report viewer control.

Friday, 24 July 2015

Stages of Reports in Microsoft Dynamics AX 2012


Report definition
The report definition file (.rdl) stored on a report server. 

Compiled report and intermediate report format
The report that uses evaluated expressions, parameters and parameter properties evaluated.

Snapshot or Report History
A snapshot is the set of report data at a specific point in time plus the intermediate format that 
contains report layout information.

Processed report
A fully processed report that contains both data and layout information.

Rendered report
A fully processed report is sent to a report renderer to combine the data and layout on each page of the targeted rendering format. Rendering extensions are customizable and extensible.

Exported report

An exported report is a fully paged report saved in a specific file format. Export formats depend on installed rendering extensions and can be customized. By default, export formats include Excel, Word, XML, PDF, TIFF, and CSV.

Type of Reports in Microsoft Dynamics AX 2012

Drilldown reports

Drilldown reports must retrieve all possible data that can be shown in the report. For reports that use large amounts of data, consider drillthrough reports instead.

Subreports

A subreport is a report item that you add to a report as a layout element. A subreport points to a different report and displays inside the body of a main report as an subreport instance.


Main/detail reports and drillthrough reports

A main/detail report solution includes a main report that displays summary information with hyperlinks to one or more reports that display detailed information.

Linked reports

A linked report is a report server item that contains a pointer to the report definition but has its own set of report properties and settings. These include security, parameters, location, subscriptions, and schedules.

History reports

Report history is a collection of report snapshots. You can use report history to maintain a record of a report over time.

Cached reports

A cached report is a saved copy of a compiled report and report data. Cached reports are used to improve performance by reducing the number of processing requests to the report processor and by reducing the time that is required to retrieve large report datasets.

Snapshots

A report snapshot is a report that contains layout information and query results that were retrieved at a specific point in time.

Model reports and Clickthrough reports

(i) Report model :A report model is a user-friendly description of an underlying database, with pre-established data relationships and auto-generated queries. Report models can be used as data sources for reports created in Report Designer and Report Builder.

(ii)Clickthrough report : A clickthrough report is a report that displays related data from a report model when you click the interactive data contained in the model-based report. Clickthrough reports are autogenerated.

Saved reports

A saved report is a report definition (.rdl) file. A report definition can be saved locally or uploaded to a report server.

Published reports

A published report is a report server item that you publish to a report server from a Reporting Services tool.
  

Upgraded reports

An upgraded report is a published report definition that is converted to a newer schema when a report server is upgraded from one version of Reporting Services to a later version. The original report definition is preserved. The report is upgraded in memory, compiled, and the compiled version is saved internally.