Walkthrough: Integrating New Reports into Microsoft Dynamics AX (Visual Studio Reporting Tools for Microsoft Dynamics AX)

Dynamics AX 2009

In this walkthrough, you will create a report, and then integrate the report into Microsoft Dynamics AX. After the report is in Microsoft Dynamics AX, you will create an output menu item for the report and display the report on a menu within the application.

This walkthrough illustrates the following tasks:

  • Creating a report

  • Importing a reporting project into Microsoft Dynamics AX

  • Displaying a report on a menu in Microsoft Dynamics AX

  • Deploying a report library to a report server

  • Verifying the results

To complete this walkthrough, you will need:

  • Microsoft Dynamics AX SDK with sample data

    NoteNote

    This walkthrough uses the InventTable table. To view data in the report, this table must be populated with data.


  • Microsoft SQL Server 2005

  • Microsoft Visual Studio 2008

  • Microsoft Dynamics AX Reporting Tools for Visual Studio

  • Microsoft Dynamics AX Reporting Extensions

  • Your own label file

    NoteNote

    If you do not have a label file, use the label file wizard in Microsoft Dynamics AX to create a label file.


You will start by creating a reporting project that contains a report that will be integrated into Microsoft Dynamics AX. Typically, a reporting project contains a set of related reports. For this walkthrough, you will work with a single report.

To create the report

Now that you have created the report, you are ready to import the reporting project into Microsoft Dynamics AX. A report library is added below the Report Libraries node in the AOT for a reporting project after it has been imported. The following procedure explains how to import a reporting project into Microsoft Dynamics AX.

To import the reporting project into Microsoft Dynamics AX

  1. In Microsoft Visual Studio, open the reporting project that you created in the walkthrough specified in the previous procedure.

  2. In Solution Explorer, right-click the SampleItemReport project, and then click Save to AOD. A message displays at the bottom of the window that indicates the save to AOD process was successful.

  3. Close Microsoft Visual Studio.

  4. Open Microsoft Dynamics AX.

  5. In the AOT, expand the Report Libraries node. Notice that a report library called SampleItemReport has been added in the layer that you are currently working in.

    NoteNote

    If you do not see the report library, restart the Microsoft Dynamics AX client to update the metadata cache.


Now that the report library is available in Microsoft Dynamics AX, you are ready to use the report in the application. An output menu item is used for an application object whose primary function is to display a result, such as a report. The following procedures explain how to create an output menu item for the report, and then add the output menu item to a menu in the Inventory management module.

To create a menu item for the report

  1. In the AOT, expand the Menu Items node.

  2. Right-click the Output node, and then click New Menu Item.

  3. Select the node for the menu item.

  4. In the Properties window, specify the following values.

    Property

    Value

    Name

    ItemList

    Label

    Click the ellipsis button (…) to display the label editor. In the label editor, click the Setup tab, and then select your label file from the Label file ID field. Click the Label tab. Press CTRL+N to create a new label. Type Item list for the label text. Press CTRL+S to save the label.

    ObjectType

    SQLReportLibraryReport

    Object

    SampleItemReport.ItemReport.AutoDesign1

  5. In the AOT, click Save All to save the changes.

To display the report on a menu in the Inventory management module

  1. In the AOT, expand the Menus node.

  2. Expand the Invent node, expand the Reports node, right-click the Base data node, point to New, and then click Menu item.

  3. Select the node for the menu item.

  4. In the Properties window, specify the following values.

    Property

    Value

    MenuItemType

    Output

    MenuItemName

    ItemList

  5. Drag-and-drop the ItemList menu item so that it is the first item listed in the Base data folder.

  6. In the AOT, click Save All to save the changes.

In order to view the report in the application, the report must be deployed to a report server. You can deploy reports to a report server from within Microsoft Dynamics AX. In this case, one version of a report is deployed for each culture. The following procedure explains how to deploy the report library to a report server from within Microsoft Dynamics AX.

To deploy a report library to the report server

  1. In the AOT, expand the Report Libraries node. A report library named SampleItemReport displays below the Report Libraries node.

  2. Right-click the SampleItemReport node, and then click Deploy.

  3. A window displays where you can select one or more report libraries to deploy. Be sure that the SampleItemReport node is selected, and then click Next to continue.

  4. Click Finish.

Next, you will verify that the report displays along with the other reports in the Inventory management module.

To verify the results

  1. Open the Navigation Pane if it is not already open. On the Microsoft Dynamics AX menu, point to View, and then click Navigation Pane.

  2. Select the Inventory management module.

  3. In the Navigation Pane, expand the Reports node, expand the Base data node, and then click the Item list node. The report displays.

    NoteNote

    If you do not see the report display as a menu item in the Inventory management module, restart the Microsoft Dynamics AX client to update the metadata cache.


Community Additions

ADD
Show: