最新消息:ww12345678 的部落格重装上线,希望大家继续支持。

Power script commands and Dynamics Ax 2012 SSRS reports.

AX 2012 alirazazaidi 1484浏览

When you install dynamics Ax 2012, default reports automatically deployed. But sometimes we have to deployed the reports manually. Dynamics Ax provides build in PowerShell commands to perform various operations. For testing these commands, you have to run Power shell Management Shell as Administrator.

 

$reports = Get-AXReport -ReportName *

$reports

 

Above power shell scripts helps to get the list of Dynamics Ax 2012 SSRS reports available for deployment.

 

We can also filter the list of report . Dynamics Ax 2012 provide the only two filter options Report Name and changed date. You can use following statement.

$reports | Select-Object Name,ChangedDate

 

For example if we want all reports similar to ABC classification we can filter something like this

$reports | Select-Object Name,ChangedDate | Where { $_.Name -like "ABC*" }


If reporting Server is install and configured with Dynamics Ax 2012, we can use following statements to deploy all available reports.

If we want to deploy a single required report we have to use following statement.
Publish-AXReport –Id SSRSConfigID -ReportName CustTransList
In my case SSRSConfigID will be machine name
Publish-AXReport –Id dynamicsworld -ReportName CustTransList

If we have to deploy all reports then we can use following statement.

Publish-AXReport –Id SSRSConfigID –ReportName *

Above statement also works if we did not use SSRSConfigID.
Publish-AXReport –ReportName *