How to add a hyperlink to Oracle Report

Source: Internet
Author: User

1. Add a text box to the corresponding position in the report page layout, which is generally Download
Right-click a link in the PL/SQL editor and add the following content:
Copy codeThe Code is as follows:
Function B _13FormatTrigger return boolean is
Begin
IF upper (: P_ACTION )! = 'Download' THEN
Return (FALSE );
ELSE
Srw. set_hyperlink (EXP_FILE.linkto );
Return (TRUE );
End if;
End;

2. Create program units EXP_FILE and EXP_FILE, and add the link_to function. The content is as follows:
Copy codeThe Code is as follows:
FUNCTION linkto RETURN VARCHAR2
IS
BEGIN
RETURN (: P_URL | filename );
END linkto;

3. Compile the trigger BEFORE_REPORT and append the content to be downloaded to the download page. The content is as follows:
Copy codeThe Code is as follows:
Function BeforeReport return boolean is
Begin
If upper (: P_ACTION) = 'Download' then
: P_SESSION: = USERENV ('sessionid ');
: P_TEST: = EXP_FILE.make ('events _ Item_Reference_Enquiry _ '| to_char (sysdate, 'yyyymmddhh24miss'),: P_USERID, 'csv', false );
EXP_FILE.append ('| 'event Item Reference enquiry' |' | '| '| ');
EXP_FILE.append ('|' |' | ');
EXP_FILE.append ('selection criteria '| 'ccn:' |: p_CCN | '| 'mas Loc:' |: p_MASLOC | '| '| ');
EXP_FILE.append ('| 'division:' |: P_FR_DIV | ': '|: p_TO_DIV | '| '| ');
EXP_FILE.append ('| 'vendor:' |: P_FR_VENDOR | ': '|: p_TO_VENDOR | '| '| ');
EXP_FILE.append ('| 'item:' |: P_FR_ITEM | ': '|: p_TO_ITEM | '| '| ');
EXP_FILE.append ('dept' * '| 'bad' |' | 'pur Loc '| 'item' |' | '| 'make' |' | 'description' | '| 'env. std. '|' Env. status ');
Return (true );
Else
Return (true );
End if;
End;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.