O'Reilly logo

Beginning Oracle® Application Express by Paul Turley, Chris Leiter, Dan Wood

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

4.2. Calculation

One of the guidelines for good data design is to reduce the amount of storage needed for your data. In olden times, when storage was more expensive, this guideline made economic sense, and it still makes logical sense today — why store something you can recreate at will?

In this section, you will add some information relating to Order Items that will be useful to the user but that will not require any changes in data storage.

Try It Out: Adding a Calculation

The columns for the ORDER_ITEMS table contain the list price of the item and the quantity of the item. The user may not want to perform the multiplication in his head to figure out the total charge for the items, but you can easily add this result to the report you have created with techniques you already know.

  1. Return to the main development area for the master-detail page for ORDERS and ORDER_ITEMS, which should be Page 4 if you have been following along in the instructions.

  2. Click on the Report link in the second Region of the page, and then click on the Region Definition tab. Click on the Show Source link in the Source section of the page.

The source shown is displayed as text — you don't have the ability to edit it, as you will have to so that you can accomplish your task. When this report was created, the report was designated with a type of SQL Query (Structured Query). This type of report has an additional tab for the report attributes labeled Query Definition. If you go to this tab, you will see that ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required