Showing posts with label AX 2012 SSRS. Show all posts
Showing posts with label AX 2012 SSRS. Show all posts

Sunday, 24 August 2014

The report server has encountered a configuration error. Logon failed for the unattended execution account. (rsServerConfigurationError)

Complete Error:

The report server has encountered a configuration error. Logon failed for the unattended execution account. (rsServerConfigurationError)
 Log on failed. Ensure the user name and password are correct. (rsLogonFailed)

 Logon failure: the specified account password has expired.

Solution:

Go to Start > Reporting Service Configuration Manager > open tab Execution Account


Now enter the correct credentials.

Then try running the report again.The error must be gone.

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,

Wednesday, 20 August 2014

Calling SSRS Report from X++ code.

Run SSRS Report without a modified contract using X++ code

static void Job_RunSSRSReport(Args _args)
{

///srsreportruninterface class provides a set of APIs to run report programmatically.
SrsReportRunInterface        reportRun;

//Create an instance of the report
//Pass in the report that you want to run by using the syntax
// '<ReportName>.<DesignName>'
reportRun           =        new    SrsReportRunImpl('SampleReport.Design');

// Run the report that is passed.

reportRun.runReport();

}

Saturday, 2 August 2014

Ways to deploy SSRS Reports in AX 2012

There are 3 ways to deploy a AX 2012 SSRS report.

1)From Microsoft Dynamics AX(The reporting project needs to be added to AOT first for this option.)

  • Open the Development Workspace.
  • Find the report you have to deploy in SSRS Reports > Reports
  • Right-click and click Deploy Element.

2)From Microsoft Visual Studio
  • In the Solution Explorer right-click on the reporting project that contains the report.
  • Click Deploy.

3)From Microsoft PowerShell
  • This supports deploying multiple reports at a time.
  • For more details see AX 2012 PowerShell

Note: The SSRS report that is created has to be deployed to the reporting server.Till then it is not available for the users.