There two common and mostly used ways to develop reports in dynamics Ax 2012

  1. Query
  2. Report data Provider.

 

Here we have to create a very simple report using AOT query. For this purpose I have create a custom table Student with 4 fields as

  1. Rollnumber
  2. First Name
  3. Last Name
  4. Address

The sample data in custom table is as follow.

SampleData

 

 

Now we create a new Query in AOT which will be used in our Report to get data from AX to display on report.

In Query node of AoT create a new query Named it StudentsQuery.

Right click and on data source click on add new data source and on property window select or right Student table as follow.

StudentQueryDataSource

 

Click on Fields and from property window dynamics to yes.  Like as

Dynamic Fields

 

 

Now open a new  Project In Visual studio 2010. Select form Install templates  select Dynamics and then Report Model

Report Model

 

Now next step to add a new report in newly created Report Model project

I named it simple student report.

Now right click on Dataset and add a new dataset in report and Name it StudentDs and from property of data set you have set following property

DataSetProperty

 

 

Click on Query and form dialog box you have to search and select Query selected Query form Dynamics Ax. In this report we created the query with StuentsQuery. On selecting and press next a new dialog open you from here you can select fields required for report in this report we are just use 4 fields

DsStudent

 

 

 

After selecting field now create a new precision design.  Add new table and drop the field on column of table as follow. Press on review pane you find result like as

Report Result