October 23, 2014
By Anna Timbol, Team Lead, Product Development
In previous posts, a couple of Infor Lawson Smart Reports features were discussed on how to style your report, such as using true type fonts. In this post, we will provide a step by step process on how to embed a URL link in your report. The URL could be any link – an external URL to a website, or perhaps a link that is dynamically created using some of the report’s data.
In this post, we’ll be using a specific example of a URL linking to an image capture of an invoice.
- Open the .rptdesign file in Infor Lawson Smart Reports designer.
- Select a Cell wherein you want to display the link. The Cell could be an existing cell on the report, or a new column or row could be created prior to this. For this example, it will be on an existing cell where data is displayed. The goal here is to replace the existing Invoice number text with a link.
- On the chosen cell, copy the Expression of the existing Dynamic Text element which is displaying the data. This will be used on the next step.
- Still on the same cell, right-click and choose Insert -> Text. A window will be displayed wherein the content of the Text element can be added. Select “HTML” from the dropdown, and see example of content below. The text between <VALUE-OF> and </VALUE-Of> is the text that was copied from #3. This is to ensure that the same data will be displayed. Click OK.
- Still on the same cell, select the Dynamic Text from step #3. Right-click on it, and choose Delete. This will remove the old report element displaying the data, and will be replaced by the newly created Text element with the link.
- Click on Preview from the designer’s menu, View Report, then select As PDF option. You will now see the same data, except that it is now a link pointing to an image.
- Clicking on this link will display a captured image of the invoice.
- Once modifications are finalized, the template must be saved in the LSR directory. Please refer to Saving the customized template in LSR directory from the User Guide.
These steps can be applied to any kind of hyperlink you want to create on a report. Let us know in the comments if you found this helpful.