Book Image

Oracle APEX 4.2 Reporting

By : Vishal Pathak
Book Image

Oracle APEX 4.2 Reporting

By: Vishal Pathak

Overview of this book

<p>The biggest challenge in the reporting world is to reduce the overall project cost by picking a tool that minimizes effort and time and to ensure an enriching user experience. Oracle APEX, a 4GL technology, with its unique features such as low implementation time and flexibility, aids us in creating performance-tuned applications with minimum hassle. <br /><br />"Oracle APEX 4.2 Reporting" is a unique blend of fascinating solutions and intriguing integrations which gives you a 360 degree view of the reporting solutions available to you on the market. It showcases advanced APEX solutions that will empower you to fulfill all kinds of tricky requirements of the reporting world. Live applications support the discussions in the text, enabling you to perform your own experiments on prebuilt applications to take your learning to new heights.<br /><br />"Oracle APEX 4.2 Reporting" will help you build a well-founded understanding of Oracle APEX along with most of the reporting technologies used today. It is written with the idea of being as practical as possible so that you reap the benefits from day one.<br /><br />Starting with a brief introduction to the architecture of APEX and installation to enable you to see the applications provided with the book in action, we then move on to the uses of Classic and Interactive reports and explore the advanced features of APEX. We will also explore the most widely used reporting solutions, which is then followed by a brief discussion on BPEL, which is like the glue that can gel any number of tools together. Oracle 4.2 APEX Reporting concludes with several ways of tuning an APEX application, as good performance is the heart of customer satisfaction.</p>
Table of Contents (17 chapters)
Oracle APEX 4.2 Reporting
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Database and web interaction in DAD and Listener configurations


This section is dedicated to the process of invocation of a stored PL/SQL function using DAD and APEX Listener. Let us first see the DAD configuration.

The DAD configuration

Let us try to recreate the fun of crafting APEX by making our own DAD and doing a few things with it. This will help us boost our understanding of the ins and outs of APEX. Make sure that you have set your XMLDB HTTP server to work on the port of your choice using DBMS_XDB.sethttpport. You will have to use this port and the IP address of your database server in all the URLs of this section. <your_database_ip:<your_db_http_port> will replace localhost:8080 in the URLs of this section.

The code in 4-98-9_Appendix_create_dad.sql creates and configures a DAD for you. The DAD you create is authorized to execute the procedures in the schema you mention in the Enter the name of the schema with which you want to associate this DAD: prompt. Execute the following using sysdba.

SQL> @4-98-9_Appendix_create_dad

I believe that you have compiled the appendix package in your schema. If not, then check the beginning of the Appendix to find to command to do this. Open the Appendix package and have a look at the appendix.dad_proc procedure.

Invoke the following URL. Here packt_dad is the name of the DAD which we just created:

http://localhost:8080/packt_dad/APPENDIX.DAD_PROC?val=Hello%20World&redirect_url_var=http://www.google.com

We can also use the following URL:

http://localhost:8080/packt_dad/PACKT_SCHEMA.APPENDIX.DAD_PROC?val=Hello%20World&redirect_url_var=http://www.google.com

Invoking the previous URL opens the Google home page and inserts Hello World into the dad_table. The insertion is shown in the previous screenshot.

In this example, we saw the use of OWA package to do web interaction. We also saw insertions in the database. The best part was that both the web interaction and the database insertion were done by the same URL. This is pretty much what APEX does but it does it on a lot bigger scale.

The Listener configuration

We can call the same function in the Listener configuration by giving execute rights on this function to APEX_PUBLIC_USER and listing the function in the defaults.xml file of the Listener configuration. Defaults.xml can be found in the Listener's configuration directory. We can find the location of the Listener configuration directory by executing the following command:

C:\ >java -jar <Directory holding apex.war>\apex.war configdir

Add the following tag in the defaults.xml file and restart WebLogic:

<entry key="security.inclusionList"> apex, p, v, f, wwv_*,y*, c*, PACKT_SCHEMA.*,packt_schema.*, apex_util.*</entry>

This will ensure that the procedures defined in PACKT_SCHEMA are directly accessible from the browser. If your schema name is different, then put the same instead of PACKT_SCHEMA in the previous code.

Execute the following using sysdba. This will ensure that APEX_PUBLIC_USER has execution rights on the APPENDIX package in packt_schema:

grant execute on packt_schema.appendix to apex_public_user;

The following link will open the Google home page and insert Hello World into dad_table:

http://<apex_listener_webserver>:<apex_listener_webserver_port>/apex/PACKT_SCHEMA.APPENDIX.DAD_PROC?val=Hello%20World&redirect_url_var=http://www.google.com