How do you add a hyperlink (URL) to an RDLC report layout in Business Central?
First, get your hands on the RDLC layout. If you are a developer, you can simply open the RDLC layout, because you have it in VSCode. If you are an end user, you need to open the layout in the Report Layout Selection page.
Imagine we want to add the hyperlink (url) in the Sales Invoice report, then filter the Report Layout Selection page to that report:
And then open the Custom Layouts.
Here you select the custom layout that is being used for the report, or you create a new custom layout:
The new RDLC layout, which is a copy of the built in RDLC layout, is now available. Let’s export it:
Then open it in Report Builder of Visual Studio.
Next set the Value expression for the textbox that needs to display the hyperlink (URL):
This is what will be shown in the textbox.
Then open the textbox properties and select Action. There you enable: Go to URL, and then enter the URL (hyperlink):
Now Save and Close the RDLC layout.
Now import the RDLC layout in Business Central:
Then Run the report:
Now you will see the link in the report layout. When you hover your mouse over it, a yellow background appears, and you can click the textbox, which then opens the URL in a new tab.
That’s it!
Discover more from think about IT
Subscribe to get the latest posts sent to your email.
I am receiving an error when uploading my report:
Rendering output for the report failed and the following error occurred: Report ” contains hyperlinks. The EnableHyperlinks property has not been set for this report
How do I change the EnableHyperlinks property?
You can set it in the report properties in the al file.