Open Hyperlink In New Browser Window From Master Report With PDF Output

We have a report which has a hyperlink that is set in the Property Inspector. When you run report on web using PDF format and click on the drill down field, it opens the new url in the same Internet Browser window. 

Sample Create report based on the table DEPT, 
using query "select * from dept where deptno = :dn". In Property Inspector of F_DEPTNO field, put :
           Hyperlink:        http://oracleapps4u.blogspot.com/          
Additional Hyperlink Attributes: target="blank"
                                                        or target="newwindow"

Save report as demo_http_pdf.rdf, and run it on web using PDF format. For example:

http://<hostname>:7778/reports/rwservlet?report=hypertest_pdf.rdf&destype=cache&desformat=pdf&userid=scott/tiger@db¶mform=yes

When submit report using parameter value :dn = '20', and then click on the department number '20', the hyperlink (to Oracle website) opens in same window.

But How can you make this open in new browser window?
Solution PDF does not support hyperlink in a separate window; 


however, we can use set_pdf_action to execute the command we need. Hence, use srw.set_pdf_action instead of srw.set_hyperlink.

Here are the steps based on our sample above:
1. Copy iexplore.exe executable to C:\ subdirectory.
2. Remove the Hyperlink information in Property Inspector of F_DEPTNO field.
3. Create format trigger on the field you want the hyperlink on, in this case F_DEPTNO:




function F_DEPTNOFormatTrigger return boolean is
     v_url varchar2(300);
     begin
     v_url := 'http://www.oracle.com';
     SRW.SET_PDF_ACTION('c:\iexplore.exe ' || v_url);
     return (TRUE);
     end;




4. Save changes.
5. Run report using IE browser:

http://<hostname>:7778/reports/rwservlet?report=hypertest_pdf.rdf&destype=cache&desformat=pdf&userid=scott/tiger@db¶mform=yes

6. When submit report using parameter value 
:dn = '20', and then click on the department number :dn = '20', the hyperlink (to Oracle website) opens in a new IE Browser window.

You need to run the master report to PDF format for this to work. This will not work with desformat=html.
If all your users are using IE browser and it is installed in same location on each client, then this solution will work for you.