Thursday, November 7, 2024

Deploy SSRS Reports using PowerShell in D365 F&O

There are two ways to deploy reports in D365 FO.

First, Directly from Visual Studio using Solution Explorer or from build menu. 

Second, Deploying reports using PowerShell(Admin Mode) using below commands. 

1) For deploying all SSRS reports

K:\AOSService\PackagesLocalDirectory\Plugins\AxReportVmRoleStartupTask\DeployAllReportsToSSRS.ps1 -PackageInstallLocation "K:\AosService\PackagesLocalDirectory"

2) For deploying all SSRS report in specific module 

K:\AosService\PackagesLocalDirectory\Plugins\AxReportVmRoleStartupTask\DeployAllReportsToSSRS.ps1 -PackageInstallLocation "K:\AosService\PackagesLocalDirectory" -Module YourModuleName

In my case I have to deploy reports of FlexProperty module.

3) For deploying specific SSRS report

K:\AosService\PackagesLocalDirectory\Plugins\AxReportVmRoleStartupTask\DeployAllReportsToSSRS.ps1 -ReportName YourReportName.DesginTitle

In my case the command look like this

K:\AosService\PackagesLocalDirectory\Plugins\AxReportVmRoleStartupTask\DeployAllReportsToSSRS.ps1 -PackageInstallLocation "K:\AosService\PackagesLocalDirectory" -ReportName AFPPRStatusReport.Report

We can also use *Purch*, This will deploy all reports that have Purch in their name.