Sometimes when you run a report with an RDLC layout, you might get this error:

Rendering output for the report failed and the following error occurred: Report ” contains hyperlinks. The EnableHyperlinks property has not been set for this report.

Now the EnableHyperlinks property needs to be set in the AL part of the report if you want to use HyperLinks in the RDLC layout:

EnableHyperlinks property – Business Central | Microsoft Learn

Also notice that this property can not be set in a Report Extension object: Report, Report fields, and Report extension properties – Business Central | Microsoft Learn

Why is this important you might think?

Well recently our Business Central Saas environment was upgraded to version 27 and all of a sudden certain, not all, reports started throwing this error.

Now the reports we use are standard reports (1304 Sales Quote, 1306 Sales Invoice, 1307 Sales Credit Memo,…) and these reports do not have the EnableHyperLinks property set. We extended these reports using Report Extension objects and created custom RDLC layouts for them. In these RDLC layouts we use a link to our  “Terms and Conditions”.

So in the Report Extension we added a field to the dataset with the URL to our “Terms and Conditions” and then in the RDLC layout we added a textbox with the URL as an Action:

And until now this always worked without any errors. However since our environment was upgraded to version 27, for some of these reports we not get this error:

Rendering output for the report failed and the following error occurred: Report ” contains hyperlinks. The EnableHyperlinks property has not been set for this report.

And because a Report Extension can not set the EnableHyperLinks property, it might seem we are unable to fix the error.

Luckily I found a workaround.

Instead of using the Action, Go to URL of a textbox in RDLC, I now put the URL in the value of the textbox, and that also works.

In the resulting layout this produces:

So the text of the link is there, but you can also click it, like a regular hyperlink, in preview and also in the pdf export, and without needing to set the EnableHyperLinks property, which you can not set anyway in a Report Extension object.

I’m guessing this is a bug in this version of Business Central and that in version 27.1 or 27.2 it will be fixed, but in the meantime this is a good workaround you can apply in the RDLC layout of the report. This also means, because it’s a workaround in the layout, you can do this in Business Central, from the Report Layouts page:

by copying the existing layout into a new layout with the workaround.

A suggestion I would make to Microsoft is to make it possible to set the EnableHyperLinks property in a Report Extension object.

 

 

 

 


Discover more from think about IT

Subscribe to get the latest posts sent to your email.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Post Navigation