Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 E-mail Us
 Oracle Articles
New Oracle Articles

 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog

 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Oracle Support

 SQL Tuning

 Oracle UNIX
 Oracle Linux
 Remote s
 Remote plans
 Application Server

 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S


 Consulting Staff
 Consulting Prices
 Help Wanted!


 Oracle Posters
 Oracle Books

 Oracle Scripts

Don Burleson Blog 








  Oracle Database Tips by Donald Burleson

Creating a Report to Display the Documents with APEX

Use the link in the developer toolbar to edit the page.  Then, create a report region on the page using the SQL Report type.  Make the Title Easy Documents and use the following for the SQL Query.

The following will outline two ways to provide links in a report column, which is why the FILENAME column is selected twice.  In the SQL Query, the id and FILENAME columns have been selected, the p?n= has been concatenated with the ID, and the htf.anchorfunction included.  The htf.anchor function will return the proper html syntax to build the anchor tag.  What you will see above are two columns being selected:  FILENAME_1 and FILENAME_2.  The query syntax for the column FILENAME_1 will return the following to be displayed in the browser.

<A HREF="p?n=2860904562035412">EasyHTMLDB.pdf</A>

The second method is to modify the HTML Expression.  Edit the attributes for the report column named FILENAME_2.  Enter the following text for the HTML Expression:

<A HREF="p?n=#ID#">#FILENAME_2#</A>

Apply the changes and run the application page.  There will be two columns, FILENAME_1 and FILENAME_2, which look exactly the same.  One was done within the SQL statement and one by modifying the HTML Expression.

There is one final method that can be used to provide a link to download the document.  That is to modify the Column Link properties for the column.  To try this, remove the text in the HTML Expression for the FILENAME_2 column and make the following changes to the Column Link property of the column attributes.

        Link Text: #FILENAME_2#

        Target: URL

        URL: p?n=#ID#

Apply the changes and run the page to try it out.

This section has shown three methods for providing a link to download a document.  The truth is, I have not found any compelling reasons to use one or the other.  My personal preference is to keep it out of the SQL if possible.  Either way, developers now have three ways and can choose their favorite.

Downloading a PDF into the Browser

Although this chapter has shown how to provide document download capability to the audience, there is also the desire to permit a document, such as a PDF, to be downloaded directly into the browser.  This is a common way to provide online documents to users and is much like what can be obtained from the Oracle web site.

This feature is also provided for by APEX and is as simple as adding another parameter in the call to the P procedure in the URL.  To make the change for the HTML Expression method described above, change the text to the following:

<A HREF="p?n=#ID#&p_inline=YES">#FILENAME_2#</A>

To do the same thing using the Column Link method described above, change the URL text to the following:


Now clicking on the link EasyHTMLDB.pdf will display the document directly in the browser.  The Back button will return to the running application page.

The above book excerpt is from:

Easy HTML-DB Oracle Application Express

Create Dynamic Web Pages with OAE

ISBN 0-9761573-1-4   

Michael Cunningham & Kent Crotty

Oracle Training at Sea
oracle dba poster

Follow us on Twitter 
Oracle performance tuning software 
Oracle Linux poster


Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.