Trouble Viewing Images? Right-click on any image and select “Open in new tab” to enlarge it. You can also zoom in by holding Ctrl and scrolling up with your mouse wheel.
Article Goal
Show how to create automatic, clickable hyperlinks in Finished Reports by using a label and a BeforePrint script.
What / Why – Automatic Hyperlinks
What: Automatic hyperlinks allow a label’s value to be used as part of a clickable URL when previewing a report.
Why: This makes reports more interactive by letting users click directly into related web pages, records, or external systems without manually copying links.
Configuration Note
| Item | Details |
|---|---|
| Script type | Hyperlinks are created using a BeforePrint script on a label. |
| URL behavior | The URL can be static, dynamic, or a combination of both. |
| Preview usage | Hyperlinks are clickable in the report previewer. |
Use Case
| Scenario | Description |
|---|---|
| Record navigation | Click a report value to open a related record in a web application. |
| External references | Link to documentation, tickets, or customer portals directly from a report. |
| Dynamic URLs | Build URLs dynamically using field values from the report data. |
Steps to Create Automatic Hyperlinks
Step 1: Create and Bind the Label
Create a Label and bind it to the field that contains your hyperlink value or identifier.
(Insert image here)
Step 2: Create a BeforePrint Script
Select the label, then in the Properties pane:
Locate Scripts
Find BeforePrint
Click New
This will automatically open the script editor.
Step 3: Add the NavigateUrl Script
In the newly created BeforePrint script, add the following code:
((XRLabel)sender).NavigateUrl = "http://Example.com/" + ((XRLabel)sender).Text;
This script builds a hyperlink by combining:
A base URL (
http://Example.com/)The label’s text value
Example: http://Example.com/Text
Step 4: Adjust the URL Logic (Optional)
If you do not need to combine values:
Remove
"http://Example.com/" +to use only the label’s textOr remove
+ ((XRLabel)sender).Textto use only a static URL
Adjust the script based on how your hyperlink should behave.
Step 5: Preview and Test the Hyperlink
Preview the report and click the label.
Each label value should now open its corresponding link.
You may also format the label (font, color, underline) to make it visually clear that it is clickable.
Article Summary
This article explains how to create automatic hyperlinks in Finished Reports using a label and a BeforePrint script. By setting the label’s NavigateUrl property dynamically, you can turn report values into clickable links that open external pages or systems. This approach adds interactivity and improves usability when navigating related data directly from report previews.
Comments
0 comments
Please sign in to leave a comment.