Sunday 24 August 2014

Deploying SSRS Reports using PowerShell in AX 2012

This is to describe more in detail about Deploying SSRS Reports from Microsoft PowerShell:


To open Microsoft PowerShell:

Go to Administrative tools > Microsoft Dynamics AX 2012 management shell(run as administrator to avoid any unexpected errors)

The Microsoft PowerShell window opens up:


As you can see this is not the basic Windows Powershell.This will import four different modules on its own.
"C:Windows\system32> Get-Command" will get you all the commands available.



  • To Deploy your report type the command:

C:Windows\system32> Publish-AXReport -ReportName DemoReport1

This will deploy single report named "DemoReport1".


  • To Deploy all the SSRS reports type in the command:

C:Windows\system32> Publish-AXReport -ReportName *

This will deploy all the SSRS Reports to the Reporting Server.


  • Here is a little trick to deploy specific reports:

C:Windows\system32> Publish-AXReport -ReportName XYZ_*

This will deploy all the reports starting with the name "XYZ_" .So we can use our project naming prefix here to deploy all the reports made for a particular functionality as wildcard is supported here.


  • Another note to check the server configuration is:

C:Windows\system32> Test-AXReportServerConfiguration

Try running this before you start.If everything is set to true here we are good to go.


Note: The Microsoft Dynamics AX 2012 Management Shell is very powerful and fast.To deploy 1000 reports it would take only about 10mins which would have taken approx 45mins for 200 reports in AX 2009 SSRS.

Thanks,

No comments:

Post a Comment