Table Of ContentCloud Computing
Using Oracle
Application Express
Develop Internet-Facing
Business Applications Accessible
Anywhere and Anytime
—
Second Edition
—
Riaz Ahmed
Cloud Computing Using
Oracle Application
Express
Develop Internet-Facing Business
Applications Accessible Anywhere
and Anytime
Second Edition
Riaz Ahmed
Cloud Computing Using Oracle Application Express: Develop Internet-Facing
Business Applications Accessible Anywhere and Anytime
Riaz Ahmed
Karachi, Pakistan
ISBN-13 (pbk): 978-1-4842-4242-1 ISBN-13 (electronic): 978-1-4842-4243-8
https://doi.org/10.1007/978-1-4842-4243-8
Library of Congress Control Number: 2018964483
Copyright © 2019 by Riaz Ahmed
This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the
material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation,
broadcasting, reproduction on microfilms or in any other physical way, and transmission or information
storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now
known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with
every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an
editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the
trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not
identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to
proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication,
neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or
omissions that may be made. The publisher makes no warranty, express or implied, with respect to the
material contained herein.
Managing Director, Apress Media LLC: Welmoed Spahr
Acquisitions Editor: Celestin Suresh John
Development Editor: Matthew Moodie
Coordinating Editor: Shrikant Vishwakarma
Cover designed by eStudioCalamar
Cover image designed by Freepik (www.freepik.com)
Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street,
6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-
sbm.com, or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member
(owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a
Delaware corporation.
For information on translations, please e-mail rights@apress.com, or visit http://www.apress.com/
rights-permissions.
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions and
licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales
web page at http://www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is available to
readers on GitHub via the book’s product page, located at www.apress.com/978-1-4842-4242-1. For more
detailed information, please visit http://www.apress.com/source-code.
Printed on acid-free paper
Table of Contents
About the Author �����������������������������������������������������������������������������������������������������xv
About the Technical Reviewers �����������������������������������������������������������������������������xvii
Introduction ������������������������������������������������������������������������������������������������������������xix
Chapter 1: Introduction to Cloud Computing and the Application Project ����������������1
1.1 An Introduction to Cloud Computing ���������������������������������������������������������������������������������������1
1�2 Public vs� Private Cloud�����������������������������������������������������������������������������������������������������������2
1�3 What Is Accounting? ����������������������������������������������������������������������������������������������������������������4
1�4 Accounting System �����������������������������������������������������������������������������������������������������������������4
1�5 General Ledger ������������������������������������������������������������������������������������������������������������������������5
1�6 The Cloud Accountant General Ledger Project ������������������������������������������������������������������������6
1�7 Development Environment ������������������������������������������������������������������������������������������������������7
1�8 A pplication Segments �������������������������������������������������������������������������������������������������������������7
1�9 S ummary.................................................................................................................................9
Chapter 2: Application Navigation ��������������������������������������������������������������������������11
2.1 Create the Main Application Menu ����������������������������������������������������������������������������������������11
2�2 Modify/Add Navigation Bar Entries ���������������������������������������������������������������������������������������14
2�3 Summary...............................................................................................................................16
Chapter 3: Companies ��������������������������������������������������������������������������������������������17
3.1 Create Application Tables ������������������������������������������������������������������������������������������������������17
3�2 Create Pages for Company Setup �����������������������������������������������������������������������������������������18
3�3 Summary...............................................................................................................................19
iii
Table of ConTenTs
Chapter 4: Fiscal Year ���������������������������������������������������������������������������������������������21
4.1 Create List of Values �������������������������������������������������������������������������������������������������������������22
4�2 Create Page and Parameters Region ������������������������������������������������������������������������������������23
4�3 Create a Fiscal Year Grid �������������������������������������������������������������������������������������������������������25
4�4 Add Items to Hold Months/Dates �������������������������������������������������������������������������������������������27
4�5 Create Buttons to Generate, Save, and Remove a Fiscal Year �����������������������������������������������28
4�6 Generate Fiscal Year Process ������������������������������������������������������������������������������������������������30
4�7 Save Fiscal Year Process ������������������������������������������������������������������������������������������������������30
4�8 Delete Fiscal Year Process ����������������������������������������������������������������������������������������������������31
4�9 Fetch Fiscal Year Dynamic Action �����������������������������������������������������������������������������������������31
4�10 C reate Validation: Check Transaction ����������������������������������������������������������������������������������32
4�11 C reate Branch ���������������������������������������������������������������������������������������������������������������������33
4�12 Dynamic Actions to Hide Buttons ����������������������������������������������������������������������������������������34
4�13 Test Your Work ���������������������������������������������������������������������������������������������������������������������38
4�14 S ummary.............................................................................................................................39
Chapter 5: Voucher Types ���������������������������������������������������������������������������������������41
5.1 Create List of Values .............................................................................................................41
5.2 Create Pages for Voucher Types Setup .................................................................................42
5.2.1 Convert Text Item to Radio Group .................................................................................43
5.3 Create Validation: Check Transaction ������������������������������������������������������������������������������������44
5�4 Test Your Work �����������������������������������������������������������������������������������������������������������������������44
5�5 S ummary...............................................................................................................................45
Chapter 6: Application Segments ���������������������������������������������������������������������������47
6.1 Create Lists of Values ............................................................................................................48
6.2 Create Segments Setup Pages..............................................................................................48
6.3 Modify Segments Form ���������������������������������������������������������������������������������������������������������49
6�4 Add Tree View Region ������������������������������������������������������������������������������������������������������������51
6�5 Create Buttons ����������������������������������������������������������������������������������������������������������������������51
6�6 C reate Validations �����������������������������������������������������������������������������������������������������������������53
iv
Table of ConTenTs
6�7 Create Branch �����������������������������������������������������������������������������������������������������������������������53
6�8 Test Your Work �����������������������������������������������������������������������������������������������������������������������54
6�9 Summary...............................................................................................................................56
Chapter 7: User Groups �������������������������������������������������������������������������������������������57
7.1 Page and Parameters Region ������������������������������������������������������������������������������������������������58
7�2 Buttons ����������������������������������������������������������������������������������������������������������������������������������61
7�3 New Group Process ���������������������������������������������������������������������������������������������������������������62
7�4 Delete Group Button ��������������������������������������������������������������������������������������������������������������63
7�5 Delete Group Process ������������������������������������������������������������������������������������������������������������63
7�6 Group Privileges Region ��������������������������������������������������������������������������������������������������������64
7�7 T ree Region ���������������������������������������������������������������������������������������������������������������������������65
7�8 Add Classic Report Region ����������������������������������������������������������������������������������������������������66
7�9 Dynamic Action to Refresh Region ����������������������������������������������������������������������������������������67
7�10 Add Button and a Process to Allow/Revoke Segment Access Right �����������������������������������68
7�11 Test Your Work ���������������������������������������������������������������������������������������������������������������������69
7�12 S ummary.............................................................................................................................70
Chapter 8: Create Users ������������������������������������������������������������������������������������������71
8.1 Create Pages �������������������������������������������������������������������������������������������������������������������������72
8�2 Create/Modify Items ��������������������������������������������������������������������������������������������������������������73
8�3 Create a Process to Set Company, Year, and Month ��������������������������������������������������������������75
8�4 Test Your Work �����������������������������������������������������������������������������������������������������������������������75
8�5 Summary...............................................................................................................................76
Chapter 9: Reset Password �������������������������������������������������������������������������������������77
9.1 Add Custom Functions ����������������������������������������������������������������������������������������������������������77
9�2 Create Page ���������������������������������������������������������������������������������������������������������������������������79
9�3 Check User ID and Match Password Validations �������������������������������������������������������������������82
9�4 Update Password Process ����������������������������������������������������������������������������������������������������82
9�5 Change Authentication Scheme ��������������������������������������������������������������������������������������������83
9�6 S ummary...............................................................................................................................84
v
Table of ConTenTs
Chapter 10: Switch Company, Year, and Month ������������������������������������������������������85
10.1 Create Page �������������������������������������������������������������������������������������������������������������������������85
10�2 Add Button ��������������������������������������������������������������������������������������������������������������������������88
10�3 Add Validations ��������������������������������������������������������������������������������������������������������������������89
10�4 Update User Profile Process������������������������������������������������������������������������������������������������90
10�5 Display Company, Year, and Month ��������������������������������������������������������������������������������������90
10�6 Summary.............................................................................................................................92
Chapter 11: Cost Centers ����������������������������������������������������������������������������������������93
11.1 Create Pages �����������������������������������������������������������������������������������������������������������������������93
11�2 Delete Processes ����������������������������������������������������������������������������������������������������������������95
11�3 Modify Delete Button ����������������������������������������������������������������������������������������������������������95
11�4 A dd Button ��������������������������������������������������������������������������������������������������������������������������95
11�5 Modify Page Items ��������������������������������������������������������������������������������������������������������������96
11�6 Add Dynamic Action: Evaluate Level �����������������������������������������������������������������������������������97
11�7 V alidation: Check Level �������������������������������������������������������������������������������������������������������97
11�8 Validation: Check Parent Level ��������������������������������������������������������������������������������������������98
11�9 Validation: Check Child Level ����������������������������������������������������������������������������������������������98
11�10 V alidation: Check in Transaction ����������������������������������������������������������������������������������������99
11�11 Validation: Disallow Code Modification �����������������������������������������������������������������������������99
11�12 Process: Save Record �����������������������������������������������������������������������������������������������������100
11�13 Process: Delete Record ���������������������������������������������������������������������������������������������������101
11�14 A dd Button: Refresh ��������������������������������������������������������������������������������������������������������101
11�15 Test Your Work �����������������������������������������������������������������������������������������������������������������102
11�16 S ummary.........................................................................................................................103
Chapter 12: Chart of Accounts ������������������������������������������������������������������������������105
12.1 Create Three Lists of Values ����������������������������������������������������������������������������������������������106
12�2 Create Pages ���������������������������������������������������������������������������������������������������������������������107
12�3 Modify the Report Page (Page 15) ������������������������������������������������������������������������������������108
12�4 M odify the Form Page (Page 16) ���������������������������������������������������������������������������������������108
12�5 Create Dynamic Actions ����������������������������������������������������������������������������������������������������111
vi
Table of ConTenTs
12�6 Create Validations �������������������������������������������������������������������������������������������������������������116
12�7 Modify Process: Process Row of GL_COA �������������������������������������������������������������������������118
12�8 Create Process: Delete Record ������������������������������������������������������������������������������������������119
12�9 M odify Delete Button ��������������������������������������������������������������������������������������������������������119
12�10 M odify Save Button ���������������������������������������������������������������������������������������������������������120
12�11 D elete the Create Button �������������������������������������������������������������������������������������������������120
12�12 C reate a Highlight Rule ���������������������������������������������������������������������������������������������������120
12�13 T est Your Work �����������������������������������������������������������������������������������������������������������������121
12�14 Summary.........................................................................................................................123
Chapter 13: Copy Chart of Accounts ���������������������������������������������������������������������125
13.1 Create Page �����������������������������������������������������������������������������������������������������������������������125
13�2 Add Button ������������������������������������������������������������������������������������������������������������������������127
13�3 Add Validations ������������������������������������������������������������������������������������������������������������������127
13�4 Copy COA Process �������������������������������������������������������������������������������������������������������������128
13�5 Test Your Work �������������������������������������������������������������������������������������������������������������������128
13�6 Summary...........................................................................................................................129
Chapter 14: Enter Vouchers ����������������������������������������������������������������������������������131
14.1 Create List of Values ���������������������������������������������������������������������������������������������������������133
14�2 Create Pages ���������������������������������������������������������������������������������������������������������������������134
14�3 Modify the Master Page (Page 42) ������������������������������������������������������������������������������������135
14�4 A dd Items (Page 42) ����������������������������������������������������������������������������������������������������������136
14�5 M odify Button (Page 42) ����������������������������������������������������������������������������������������������������138
14.6 Modify the Detail Page (Page 43) ��������������������������������������������������������������������������������������138
14�7 Add/Modify Items ��������������������������������������������������������������������������������������������������������������140
14�8 M odify Validations on Page 43 ������������������������������������������������������������������������������������������ 141
14�9 A dd Page Items to Show Totals �����������������������������������������������������������������������������������������142
14�10 A dd JavaScript to Evaluate Difference ����������������������������������������������������������������������������144
14�11 Create Dynamic Actions ��������������������������������������������������������������������������������������������������144
14�12 A dd Validations to Page 43 ���������������������������������������������������������������������������������������������� 146
14�13 Modify Processes ������������������������������������������������������������������������������������������������������������148
vii
Table of ConTenTs
14�14 Control Buttons ���������������������������������������������������������������������������������������������������������������150
14�15 Test Your Work �����������������������������������������������������������������������������������������������������������������150
14�16 Summary.........................................................................................................................152
Chapter 15: Search Transactions ��������������������������������������������������������������������������153
15.1 Create Page and Parameters Region ��������������������������������������������������������������������������������153
15�2 Create an Interactive Report Region ���������������������������������������������������������������������������������156
15�3 Add a Dynamic Action �������������������������������������������������������������������������������������������������������158
15�4 Test Your Work �������������������������������������������������������������������������������������������������������������������159
15�5 Summary...........................................................................................................................160
Chapter 16: Vouchers Verification ������������������������������������������������������������������������161
16.1 Create Page and Parameters Region ��������������������������������������������������������������������������������161
16�2 Create Interactive Report Region ��������������������������������������������������������������������������������������163
16�3 Create Verification Page ����������������������������������������������������������������������������������������������������166
16�4 M odify, Delete, and Create Page Buttons ��������������������������������������������������������������������������166
16�5 M odify Page-Rendering Process ���������������������������������������������������������������������������������������168
16�6 Delete Validations �������������������������������������������������������������������������������������������������������������168
16�7 Delete Processes ��������������������������������������������������������������������������������������������������������������168
16�8 Add Processes �������������������������������������������������������������������������������������������������������������������169
16�9 Handle Branches ���������������������������������������������������������������������������������������������������������������170
16�10 T est Your Work �����������������������������������������������������������������������������������������������������������������171
16�11 Summary.........................................................................................................................172
Chapter 17: Vouchers Report ��������������������������������������������������������������������������������173
17.1 Download and Configure JasperReportsIntegration ���������������������������������������������������������173
17�2 Install Apache Tomcat �������������������������������������������������������������������������������������������������������174
17�3 Grant Network Privileges ��������������������������������������������������������������������������������������������������175
17�4 C reating PDF Reports in Oracle APEX Using JasperReports ���������������������������������������������176
17�5 C reate Database Connection ���������������������������������������������������������������������������������������������176
17�6 Create Vouchers Report ....................................................................................................179
17.6.1 Specify Data Source �������������������������������������������������������������������������������������������������179
17�6�2 Designing Report ......................................................................................................183
viii
Table of ConTenTs
17.7 Copy the Compiled Report ������������������������������������������������������������������������������������������������188
17�8 Integrating Report with Oracle APEX .................................................................................188
17.8.1 Create a List of Values ����������������������������������������������������������������������������������������������189
17�8�2 Create the Parameters Form ....................................................................................189
17�9 Summary...........................................................................................................................194
Chapter 18: Ledger Report ������������������������������������������������������������������������������������195
18.1 Create Page and Parameters Form �����������������������������������������������������������������������������������195
18�2 Create an Interactive Report Region ���������������������������������������������������������������������������������199
18�3 Formatting Ledger Report �������������������������������������������������������������������������������������������������200
18�4 G et Ledger Report in PDF ��������������������������������������������������������������������������������������������������201
18�5 Drill Down to Source Voucher ...........................................................................................201
18.5.1 Create Link in Interactive Report ������������������������������������������������������������������������������201
18�5�2 Create Voucher Page ................................................................................................202
18.6 Test Your Work ������������������������������������������������������������������������������������������������������������������203
18�7 Summary...........................................................................................................................204
Chapter 19: Trial Balance Report ��������������������������������������������������������������������������205
19.1 Trial Balance Report Table �������������������������������������������������������������������������������������������������205
19�2 Create a List of Values ������������������������������������������������������������������������������������������������������206
19�3 Create Page and Parameters Form �����������������������������������������������������������������������������������206
19�4 Create the Interactive Report Region ��������������������������������������������������������������������������������209
19�5 C reate a Process to Generate Trial Balance ����������������������������������������������������������������������209
19�6 Formatting the Trial Balance Report .................................................................................210
19.7 P rint the Selected Level ....................................................................................................212
19.7.1 Create Process .........................................................................................................212
19.8 E liminate Zero Balances ...................................................................................................213
19.8.1 C reate a Process ......................................................................................................214
19.9 Create a Validation ������������������������������������������������������������������������������������������������������������215
19�10 G et the Trial Balance Report in PDF ��������������������������������������������������������������������������������215
19�11 D rill Down to the Ledger Report ��������������������������������������������������������������������������������������215
19�12 T est Your Work �����������������������������������������������������������������������������������������������������������������216
19�13 Summary.........................................................................................................................217
ix
Description:Get the domain knowledge you need to develop real-world business apps for and in the cloud. You’ll see how Oracle APEX has made the life of web developers much easier and how it helps you create web-based data-centric applications easily and instantly without writing screeds of code.In Cloud Compu