In Reporting Services 2008 there are two possibilities for opening a link to a URL:
- Define an action
- Create your own href link
Define an action
To start with let’s focus on the first method.
Create a placeholder on an empty textbox.
Fill in the Label and Value properties. The Label is what you see when the report is in design mode and the Value is what the viewer of the report sees.
Next define the action that should take us to the URL.
The window.showModalDialog is a method that opens a modal dialog. The first parameter is a URL. In this case http://cnn.com. The function does have more parameters like the size of the window, if it is resizable, etc. The specs of the method can be found here.
The void operator makes sure that the return value of the method is not used (literally thrown into the void). If this operator is left out the browser can try to assign the return value to the href attribute.
Create your own href link
Method number two was to create your own href link. Why do this? Well because it will immediately look like a link. The action textbox will have to get some additional formatting to signal the user that they can click on it. There are probably more arguments, but let’s look at how it is done.
The first step is the same as the previous method: create a placeholder on an empty textbox.
Fill the Label and the Value properties, and set the “Markup type” to HTML.
The Value property gets the following value:
="<a href=""j avascript:void(window.showModalDialog('http://cnn.com'))"">My link</a>"
This TechNet article gives more information about using HTML within a textbox (and the limitations there are).