The SSRS reports need a data source from where data can be fetched and displayed on the report. Since we are going to develop query based report therefore we will use an AOT query as a data source.
For creating report, First we have to create A AOT Query. For this we have A simple AOT query base on Bank Deposit table
By Default there is no field selected under field.
Click on it and set dynamic property to ‘YES’, so all possible filed will appear on table.
You can see all the fields of the table.
Now open Visual studio and create a new SSRS report named it as QueryBasedReport. Use this query as data source
Now you need to create a data set, QueryBasedReportDS, that will refer to an AOT query created earlier. In data set properties set ‘Data Source Type’ to ‘Query’ and in query property select the AOT query SampleQuery created earlier.
All the fields are visible under Fields node of QueryBasedReportDS. These fields won’t be visible if you haven’t set ‘Dynamic’ property of Fields to ‘Yes’ in AOT query and you won’t be able to see any field on report. Now add an auto design by right clicking on Design node and name it Report. Drag the data set of your report “QueryBasedReportDS” to report design named ‘Report’.
Make sure that the table you are using has some records in it. If there is data in table and still you are unable to see records on report, you might need to do following steps. Go to ‘Parameters’ node of your report ‘QueryBasedReport’.Right click on AX_ComapnyName and select properties. Set the value of the property ‘Visibility’ from Hidden to Visible and save the changes.Now right click on report design to preview it. Following dialog will appear. Enter AX_CompanyName ‘CEU’.
Now click on Report tab. Following report output will be shown.You can also view the developed report from browser using following url http://localhost/reports but before this you need to deploy the report on report sever. This can be done by right clicking the solution in
visual studio and selecting deploy. default.
If this service is not started, start it. If it is already started, you need to restart it. After restarting the service, go to visual studio and deploy the solution. Your report is successfully deployed on the server.
Now you can see the report result from any browser. Go to http://localhost/Reports click on DynamicsAX folder and click on the report you want to run. In our case, it is QueryBasedReport.Report. If you can’t find any record, change the company name from DAT to CEU.
Now you can see data on the report.
Running report Inside Dynamics AX Client, you have to output menu item. Save following properties and save the changes.
You will see records on the report.
So these were the errors and solutions, I came across so far. I hope it helps. If you have encountered some more, please do share. Keep rocking 🙂