SRW.SET_HYPERLINK
built-in procedureThis 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.
SRW.SET_HYPERLINK('hyperlink');
Parameter |
Description |
hyperlink |
Is a valid link:
|
SRW.SET_HYPERLINK
should only be set in a format
trigger.
You can also define this attribute using the Reports Builder user interface:
Property Inspector |
Set the Hyperlink property. |
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;
Creating a hyperlink using PL/SQL
About the
Reports Builder built-in package (SRW
)
Copyright © 1984, 2005, Oracle. All rights reserved.