Dynamics NAV Report – Go To URL
Microsoft Dynamics NAV Reports are Interactive. along with features like Interactive sorting, Toggle visibility, it is also possible for end users to open hyperlinks and drill down into details by opening pages and reports from a report preview!
In the below picture, the main report is a customer list report and it is outlined with a red border. This main report has hyperlinks, links to open customer card page and Customer – Detail Trial Bal. report.
In this blog, I’m going to explain how to enable these links on the NAV report.
The report dataset is simple and it is shown in the below picture. Also, I have skipped all the customers who do not have home page filled by writing a small piece of code on OnAftergetRecord() trigger.
Whenever a NAV report has links on it, it is important to enable them by setting the EnableHyperLinks report property.
Next, open the Visual studio layout designer. In the body section, use a Table to insert customer data as shown below:
Change the Font color for Home Page, Customer Card Link (Exp) and Balance textboxes through Text Box Properties.
Next, We need to specify the Action for these 3 textboxes.
1. To open customer web site/home page from a report when the web site address is stored in Home Page field of Customer table.
Open Text box properties for Home Page text box, select Action, choose Go To URL. Under Select URL, choose [HomePage] and OK.
2. To open customer card (21) page from a report.
Open Text box properties for Customer Card Link text box which has Expression: =”Edit Customer “+Fields!No_.Value, select Action, choose Go To URL. Click on Fx button next to Select URL to enter the expression: =”dynamicsnav://///runpage?page=21&filter=Customer.%22No.%22:”+Fields!No_.Value. Click on OK to save this action.
With this expression, we are telling the report to open Page 21 (Customer card) with filter on Customer No. = current Customer No. on the report.
3. To Open Customer- Detail Trial Balance (104) report from the current report.
Open Text box properties for Balance text box , select Action, choose Go To URL. Click on Fx button next to Select URL to enter the expression: =”dynamicsnav:////runreport?report=104&filter=Customer.%22No.%22:”+Fields!No_.Value. Click on OK to save this action.
With this expression, we are telling the report to open a new report 104 (Customer – Deatil Trial Bal.) with filter on Customer No. = current Customer No. on the report.
Save the report and run it to see the links work :)
Comments
- Anonymous
August 23, 2016
Hi Suvidha,you have decribed how to create a hyperlink to open a page from a report with filter on specific record. It does not work like that. I get an error message "action runpage contain additional unknown parameter". It means a parameter filter can not be used with runpage action. Could you confirm this or did i something wrong?cheers. sergej