Udostępnij za pośrednictwem


Opening a Report in the Microsoft Dynamics NAV Web Client by Using a URL

You can open a specific report in the Microsoft Dynamics NAV Web client by typing the report's URL in the address of a web browser. After you have the URL of a report, you can use it as a hyperlink to the report, which you can include in other sources, such as emails or Word documents, or send to other users.

Important

Certain data in the URL, such as company name, could be considered sensitive information. Use discretion if you distribute URLs that contain the company name, or if it is possible, exclude this information from the URL.

Example

The following address displays report 5 Receivables – Payables for the CRONUS International Ltd. company. The page is displayed in a Microsoft Dynamics NAV Web client that is running on port 8080 of a computer that has the name MyWebServer.

https://MyWebServer:8080/nav_server_instance/?report=5&company=CRONUS%20International%20Ltd.   

Or for Microsoft Dynamics NAV 2017 and earlier versions:

https://MyWebServer:8080/nav_server_instance/WebClient/default.aspx?report=5&company=CRONUS%20International%20Ltd.   

There are several parameters that define the URL for the report. These parameters are described in the URL Parameters section of this topic.

Note

Unlike pages, you cannot filter the data in a report using the URL.

Report Address Syntax

The address for opening a report in the Microsoft Dynamics NAV Web client has the following syntax.

<http|https>://<webserver>[:<port>]/<webserverinstance>/?report=<ID>&[tenant=<tenantID>]&[company=<companyname>]  

Or for Microsoft Dynamics NAV 2017 and earlier versions:

<http|https>://<webserver>[:<port>]/<webserverinstance>/WebClient/default.aspx?report=<ID>&[tenant=<tenantID>]&[company=<companyname>]  

Syntax Key

The following table describes the notation that is used to indicate address syntax.

Notation Description
Text without brackets Parameters that you must type as shown.
<> A placeholder for values that you must supply. Do not include the brackets in the address.
[] Optional parameters. Do not include the brackets in the address.
| A set of values from which to choose. Use one of the options and do not include | in the address.

Building the Report Address

Use the following guidelines to write report URL syntax and create a URL:

  • Place parameters in any order after .aspx? because the order is not important. For example, default.aspx?company=CRONUS%20International%20Ltd.&report=5 yields the same as default.aspx? report=5&company=CRONUS%20International%20Ltd..

  • Separate parameters after aspx? with the ampersand symbol (&).

  • Use %20 for any spaces in values and names.

Report Address Parameters

The following table describes the parameters of the URL for displaying a report.

Parameter Description
http|https Specifies the Internet protocol to use. Valid options are http and https.

The https protocol helps secure the Dynamics NAV data that is transmitted over the Internet. To use https, Secure Sockets Layer (SSL) must be enabled on the connection to Microsoft Dynamics NAV Web client. For more information, see How to: Configure SSL to Secure the Connection to Microsoft Dynamics NAV Web Client.
webserver Specifies the name of the computer that is running Microsoft Dynamics NAV Web client.
port Specifies the server port on which the Microsoft Dynamics NAV Web client is running. The default port is 8080.
webserverinstance Specifies the name of the web server instance for the Microsoft Dynamics NAV Web client. On IIS, this is the alias of the virtual directory of the web server instance.

When you install the Microsoft Dynamics NAV Web client using Dynamics NAV Setup, the web server instance is given the same name as the Microsoft Dynamics NAV Server instance that it connects to. If you use the New-NAVWebServerInstance cmdlet to add Microsoft Dynamics NAV Web client instances, then you specify the web server instance name. For more information, see How to: Set Up Multiple Web Server Instances for the Microsoft Dynamics NAV Web Client.
default.aspx Specifies the name of the active server page (.aspx) file to use to display the report.
ID The ID of the report in Dynamics NAV.
tenant Specifies the ID of the tenant to connect to. You must provide this parameter when Dynamics NAV is deployed in multitenant architecture. The tenant that you specify must be mounted on the Microsoft Dynamics NAV Server instance that the Microsoft Dynamics NAV Web client connects to. For more information, see Multitenant Deployment Architecture.
company The name of the company in Dynamics NAV for which you want to display the page.

If you do not choose a company, then Microsoft Dynamics NAV Web client uses the company that is defined in the configuration file. If no company is defined in the configuration file, then the last company opened by the user is displayed.

See Also

Deploying the Microsoft Dynamics NAV Web Server Components
How to: Install the Web Server Components
Developing for the Microsoft Dynamics NAV Web Client
How to: Open the Microsoft Dynamics NAV Web Client