A script-enabled browser is required for this page to function properly.

SRW.SET_HYPERLINK built-in procedure

This procedure specifies a URL Web link to another document or destination.

Note: An object that is the source of a Web link cannot also be associated with an action.

Syntax

SRW.SET_HYPERLINK('hyperlink');

Parameter

Description

hyperlink

 Is a valid link:

  • To another document on the same machine (for example, file:/private/mynewdoc.pdf or file:///C|/temp/mynewdoc.pdf)
  • To another document on a different machine (for example, http://www.newmach.com/newdoc.pdf)
  • To a destination within the current document (for example, #my_dest_name)
  • To a destination within a local document (for example, file:/private/somedoc.pdf#a_dest_name)
  • To a destination within a remote document (for example, http://www.newmach.com/newdoc.pdf#some_dest_name)
  • To any URL (for example, http://www.newmach.com/newdoc.html, ftp://www.reposit.com/filetoget.example, http://www.somemch.com/cgi-bin/webmenu?choice1)

Restrictions

GUI access

You can also define this attribute using the Reports Builder user interface:

Property Inspector

Set the Hyperlink property.

Examples

Example 1

The format trigger below defines a Web link to a destination (mytarget) in another document (newdoc.pdf) for the boilerplate object B_2.

Note: If the target were in the same document, you would omit http://www.newmach.com/newdoc.pdf.
 

function B_2FormatTrigger return boolean is
begin
SRW.SET_HYPERLINK('http://www.newmach.com/newdoc.pdf' ||
'#mytarget');
return (TRUE);
end;

Example 2:  Dynamic SRW.SET_HYPERLINK example

The format trigger below defines a Web link for the boilerplate object B_3. Notice how the destination of the link is determined dynamically based upon the values of SRCDIR and CF_PICKVIDEO. For example, if the value of SRCDIR were http://www.newmach.com and CF_PICKVIDEO were good.avi, this function would assign the following Web link to the object: http://www.newmach.com/webdemo/src/good.avi.

function B_3FormatTrigger return boolean is
begin
SRW.SET_HYPERLINK(:srcdir||:cf_pickvideo);
if ( upper(:cf_pickvideo) like '%GOOD%' ) then
SRW.SET_FOREGROUND_BORDER_COLOR('green');
SRW.SET_BACKGROUND_BORDER_COLOR('green');
end if;
return (TRUE);
end;
/* SRCDIR is a parameter whose value is determined at 
** runtime by the following After Parameter Form trigger
*/
function AfterPForm return boolean is
begin
  :srcdir := :web_server || '/webdemo/src/';
  :docsdir := :web_server || '/webdemo/docs/';<
  return (TRUE);
end;
/* CF_PICKVIDEO is a formula column whose value is 
** determined by the following function
*/
function CF_pickvideoFormula return Char is
begin
  if ( :avg_h_div < .80 )
    then return ('bad.avi');
    else return ('good.avi');
  end if;
end;

See also

Creating a hyperlink using PL/SQL

About the Reports Builder built-in package (SRW)

SRW built-in package