Deploying reports

Whenever you make a change to a report, it must be deployed; not only when developing the report, but also when models or a model store is imported. There are several ways to do this, but the two most common ways are using AxUtil or the Microsoft Dynamics Management Shell (PowerShell). The commands in both are similar. In this example, we shall use PowerShell.

Getting ready

You will need to ensure the following points before deploying reports:

  • Ensure that you have Dynamics AX 2012 Management Shell installed on the computer that you wish to use (can be installed from the AX installation media)
  • Ensure that your Windows account has administration rights on the report server
  • Ensure that your Windows account has administrative permission on the local computer
  • Ensure that your Windows account is mapped to a user in AX that has system administrator rights
  • Ensure that your Windows account has system administrator rights within the report server instance
  • Ensure that your Windows account has content manager rights for the Dynamics AX folder within the SSRS instance

    Note

    The SSRS instance permissions are configured within the report server, for example, http://reportserver/reports.

    System administrator rights are applied when you navigate to the Site Settings | Security link.

    Content manager rights are applied in the Folder Settings link.

You will also need to know the AOS name you are deploying from. This will change your current configuration to default, but it is safer to enter this information each time.

In this example, the following information is used:

Name

Description

AOS name

Zeus

WSDL port

8101 (default)

Configuration ID

AxTestSSRS_MSSQLSERVER

The configuration id parameter was set up in the Report servers form discussed earlier. This is only required if the configuration is not default. This is not required in most implementations.

To use this, add the -id AxTestSSRS_MSSQLSERVER parameter to the publish-AXReport command.

For example:

Publish-AXReport -ReportName * -ServicesAOSName Zeus –ServicesAOSWSDLPort 8101 –RestartReportServer –Id AXTestSSRS_MSSQLSERVER

How to do it...

The following steps are performed within the Microsoft Dynamics AX 2012 Management Shell which is PowerShell with the AX PowerShell commands preloaded.

  1. Open the Management Shell:
    • Windows 8 or Windows Server 2012: Search for Management shell and click on the result Microsoft AX 2012 Management Shell
    • Windows 7 or Windows Server 2008: Open Administration Tools from the windows start menu and open Microsoft AX 2012 Management Shell
  2. To deploy all reports (which can take some time) you should enter the following command:
    Publish-AXReport -ReportName * -ServicesAOSName Zeus –ServicesAOSWSDLPort 8101 –RestartReportServer
    

    Note

    The RestartReportServer parameter will restart the reporting services' service after the deployment is completed, any running reports will be aborted. You can omit this parameter, but you may find that users experience problems due to caching.

  3. The system will display the progress in a textbox at the top of the window and will report which reports succeeded or failed in the Powershell window.
    How to do it...
  4. If the update succeeds, simply close the PowerShell window.

How it works...

The reports are stored in AX as Visual Studio projects, which must be built and deployed to the report server. Although you could do this within report server, this should only happen when developing the reports.

When you publish the reports, AX will build the Visual Studio project and then deploy this report to the report server as configured within AX.

There's more...

Typically, you will be deploying a specific report, or a range of reports (you may have installed a report pack whose reports begin with a prefix).

The following commands are useful for deploying purposes:

Reports that have been modified after a certain date (in this case 25/09/2013) can be deployed using the following command:

Publish-AXReport -ReportName * -ModifiedAfter 2013-09-25-ServicesAOSWSDLPort 8101 -ServicesAOSName Zeus-RestartReportServer

To deploy the SalesInvoice report, the following command is used:

Publish-AXReport -ReportName SalesInvoice –ServicesAOSWSDLPort 8101 -ServicesAOSName Zeus –RestartReportServer

Reports starting with Sales that were modified after 25-09-2013 are deployed using the following command:

Publish-AXReport -ReportName Sales* -ModifiedAfter 2013-09-25 –ServicesAOSWSDLPort 8101 -ServicesAOSName Zeus –RestartReportServer

Common warnings and errors

You may find that you are given rather cryptic error messages if something goes wrong.

The most common reason is a typo, which can result in following message:

Common warnings and errors

The following message means that the SSRS service is not running or it cannot be accessed:

Common warnings and errors

To solve the previous message, first open the report server form from within AX and click on Validate settings for the default configuration. If this succeeds, it is most likely a timeout on the request; it is worth trying again with a single report. If it continues to fail, it means that there is a fault within SSRS.

You may be given errors from specific reports; in these cases, you should pass this information onto the developer.

One very common warning is that the layout contains an overlap. This exists even on standard reports and doesn't affect the printing or rendering to screen.

Common warnings and errors
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.14.109.61