Walkthrough: Creating a Link from a Report to a Report

NoteNote

The content in this topic only applies to Microsoft Dynamics NAV 2009 SP1. For Microsoft Dynamics NAV 2009 content, see Developer and IT Pro Help for Microsoft Dynamics NAV 2009.

This walkthrough illustrates how to set up a report to include a link from the Customer - Top 10 List report to the Customer - Detail Trial Bal. report. When you run the Customer - Top 10 List report in preview mode and show balance data, you can click either a value in the Balance (LCY) column or a section of the pie chart to view detailed balance information. By including this functionality, you now have a report that is dynamic and that you can use to drill down into data instead of a report that is static.

This walkthrough illustrates the following tasks:

  • Enabling hyperlinks on a report.

  • Adding a link from the balance text box on the report to another report.

  • Formatting the balance text box to indicate that it is a link.

  • Adding a link from the pie chart to another report.

  • Running the modified report.

Prerequisites

To complete this walkthrough, you will need:

Before you can add a link from a report to another report, you must enable hyperlinks on the report. For more information, see EnableHyperlinks Property.

To enable hyperlinks on a report

  1. In the Classic client, on the Tools menu, click Object Designer.

  2. In Object Designer, click Report, select report 111, the Customer - Top 10 List report, and then click Design.

  3. In Report Designer, select an empty line.

  4. On the View menu, click Properties.

  5. In the Properties window, in the EnableHyperlinks field, select Yes.

  6. Save and compile the report.

In the following procedure, you add a link from the balance text box in report 111, the Customer - Top 10 List report to report 104, the Customer Detail Trial Bal. report.

To add a link from the Balance Field

  1. In the Classic client, on the Tools menu, click Object Designer.

  2. In Object Designer, click Report, select report 111, the Customer - Top 10 List report, and then click Design.

  3. On the View menu, click Layout.

  4. In Visual Studio, in the Body section of the report, locate the Customer__Balance__LCY__ text box. The value of the textbox is =Fields!Customer__Balance__LCY__.Value.

  5. Right-click the text box, and then click Properties.

  6. In the Properties window, click the Navigation tab.

  7. Select the Jump to URL check box and enter the following line in the field below the Jump to URL check box:

    ="dynamicsnav:////runreport?report=104&filter=Customer.%22No.%22:"+Fields!Customer__No__.Value
    

    For more information about creating filters in a URL to run a report, see How to: Use a Shortcut to Run a Report.

  8. Click OK to close the window.

  9. Save the report in Visual Studio.

After adding the link from the balance text box to report 104, you may want to change the format of the balance text box to indicate that the data in the text box is also a link. The following steps illustrate how to format the text box.

To format the balance text box

  1. In Visual Studio, in the Body section of the report, select the Customer__Balance__LCY__ text box.

  2. On the View menu, click Properties Window.

  3. In the Properties window, in the Color field, select Blue. In the Text Decoration field, select Underline.

  4. Save the report in Visual Studio.

The following steps add a link from the data in the pie chart to report 111.

To add a link from a pie chart

  1. In Visual Studio, right-click the pie chart, and then click Properties.

  2. In the Chart Properties window, click the Data tab.

  3. Next to the Values field, click Edit.

  4. In the Edit Chart Value window, on the Action tab, select the Jump to URL check box and enter the following line in the field below the Jump to URL check box:

    ="dynamicsnav:////runreport?report=104 &filter=Customer.%22No.%22:"+Fields!Customer__No__.Value
    

    For more information about creating filters in a URL to run a report, see How to: Use a Shortcut to Run a Report.

  5. Click OK to close the Edit Chart Value window. Click OK to close the Chart Properties window.

  6. Save and close the report in Visual Studio.

In the Classic client, you must now save the modified report and compile it before it you can run the report.

To run the modified report

  1. In the Classic client, save the Customer - Top 10 List report. In the Save window, verify that the Compiled check box is selected, and then click OK.

    A message informs you that the .rdlc file for this report has changed and asks if you want to load the changes. Click Yes to save the changes in the database.

  2. In the RoleTailored client, run the Customer - Top 10 List report. You can run the report either from the Reports menu on the Customers list or you can enter the following command at the command prompt:

    dynamicsnav:////runreport?report=111

  3. In the request page for report 111, under Options, in the Show field, select Balance (LCY). In the Chart Type field, select Pie chart.

  4. Click Preview to view the report. The report lists the top 10 list of customers. If you click a value in the Balance (LCY) column or if you click a section of the pie chart, then the Customer - Detail Trial Bal. report opens for the specified customer.

Community Additions

ADD
Show: