Deep links (aka drill-through links) in SSRS reports in Dynamics 365 for Finance and Operations

You can enable deep links (aka drill-through links) in SSRS reports in Dynamics 365 for Finance and Operations by setting the Action property on the wanted textbox to Go to URL and then to specify the expression for URL using the following utility method:

You can read about this in more detail in this Microsoft blog article.

However, in some reports, e.g. the Customer base data report a dedicated method on the DrillThroughProvider class is used:

 

And this is how the Customer base data report looks like in Dynamics AX 2012 R2/R3:

What can be better when using deep links in reports?

There is certainly room for improvement regarding deep links in SSRS reports. For example, some of them would be:

  • Possibility to open a deep link in new browser tab.
  • That deep links also work in PDF output files.
  • Having control of the formatting & styles of deep links, e.g. text color.
  • Ability to wrap any part of the report with a deep link, e.g. the whole table, sections, images.

If you want to open a form showing the related customer by clicking a deep link created using Customer account number, the most convenient would be to see that customer opened in the new browser tab. Additionally, if you download or generate a PDF output file, it would be useful that PDF also contains deep links to the related customers (i.e. D365FO form showing the related customers). Unfortunately, there is no way to improve the mentioned behavior because the built-in report viewer is an ASPX control which accepts a query string in the following form:
https://usnconeboxax1aos.cloud.onebox.dynamics.com/Reporting/ReportViewer.aspx?q=...

On the other hand, if you want to share a link to any form, e.g. to the Customers form and optionally to open a particular customer, the target URL is:
https://usnconeboxax1aos.cloud.onebox.dynamics.com/?cmp=USMF&prt=initial&mi=display:CustTable&q=...

Moreover, sometimes you will find very useful an ability to control deep links’ formatting. Probably nobody wants to have Customer account number underlined and colored in blue with non-working hyperlink in output PDF files. Besides, wrapping the whole table or an arbitrary part of the document within a hyperlink can also be a useful feature. Unluckily, you cannot achieve neither of those with the built-in functionality.

How to improve deep links in reports

Docentric AX improves all of the listed shortcomings of the built-in deep links in SSRS reports.

Firstly, it enables you to replace the built-in SSRS designs with one or more Docentric designs without coding. Secondly, Docentric enables you to change the built-in data sources in a very effective way, using so called custom Docentric DSP (Data Source Provider) classes. Learn more about this technique >>

So, you will be able to add generic deep links as you would add them to any other customization of yours, using the built-in Microsoft.Dynamics.AX.Framework.Utilities.UrlHelper.UrlGenerator class.

But be careful, this code is not working in batch. Read why and how to fix it >>

If you install the Docentric AX SSRS replicas model, please locate the Open transactions report. In its custom Docentric DSP class (DocCustTransOpenPerDateDSP) you can see that generation of the deep link is implemented in the following way:

Please find the implementation of the DocGlobalHelper::generateRecordUrl() method here.

When you print the Open transactions report to Docentric Screen print destination, the result is the following.

 

You can now open a deep link wrapped around the whole table belonging to a particular customer in new browser tab.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Docentric respects your privacy. Learn how your comment data is processed >>