Before You Begin
This 10-minute tutorial shows you how to consume the RESTful
Web Source by creating an interactive report that uses a remote
database reference. Here you use the Web Source Module USGS_Earthquake_WS
that
you created in your previous tutorial Oracle Application Express 18.1: Creating a
Web Source Module (1 of 2), to produce a report that
displays the place, magnitude, and time of the
earthquakes.
This is the last tutorial in the Oracle
Application Express 18.1: Creating a Web Source Module
Series. Read the tutorials in
sequence:
- Oracle Application Express 18.1: Creating a Web Source Module (1 of 2)
- Oracle Application Express 18.1: Creating a Web Source Module (2 of 2)
Background
Web Source Modules enable developers to access Representational State Transfer (REST) services or generic JSON data feeds in applications and use the data in Application Express components such as reports, interactive reports, etc. After creating the Web Source Modules, you can build a report by running a wizard and selecting the Web Source.
In Oracle Application Express, a report is the formatted result of a SQL query. You can generate the SQL query by selecting a table or view in a wizard, or by defining the SQL query manually.
What Do You Need?
- Access to an Oracle Database
- Access to Oracle Application Express 18.1
Add an Interactive Report
An interactive report is the formatted result of a SQL query that is only supported on Desktop pages. End users can customize the report layout and data displayed by selecting options on the Actions menu.
This section describes how to create a report by running the Create Page wizard from the Application home page. You can also run this wizard in Page Designer by clicking the Create menu and selecting Page.
To add an interactive report:
- Select the application,
USGS Earthquake
. - On the application home page, select the Calendar Page
Latest_Earthquakes
. Page Designer opens. - In the Rendering tab under Content Body, select the region,
Latest_Earthquakes
. - In the Gallery (directly below the Grid Layout), click Regions, and select Interactive Report.
- Right-click Interactive Report and select
Add To, and then Content Body.
It should appear under the existing report
Latest_Earthquakes
. - To change the Region Attributes:
- In the Property Editor, update the following:
- Identification: Title
- Enter
Report
- Identification: Type - Select Interactive Report
- Source: Location - Select Web Source
- Source: Module -
Select
USGS_Earthquake_WS
- Click Save and Run page. The page appears.
- Scroll down and view the new interactive report below the calendar.
- You can arrange the columns as per your preference. Click Actions and select Columns.
- Choose the columns you would like to display in your report.
Select the columns: Time As Date, Mag, Place, and Url.
- Click Apply. The new columns that you chose in the step above are displayed.
Edit and Save Report
This section describes how you can edit the report by adding a date and time format, and then save the report.
- Return to the Page Designer.
- To display time component in the report:
- In the Rendering tab, expand Columns, select Time_As_Date.
- In the Property Editor, update the following:
- Appearance: Format Mask - Select the date and time format: DD-MON-YYYY HH24:MI.
- Click Save and Run page.
- Scroll down and view the interactive report again. Note the Time as Date column displays in the new format DD-MON-YYYY HH24:MI.
- Click the Time As Date heading. The
following dialog appears.
Note that you can view the report in any order you want to. - Save the report:
- Select the Actions menu.
- Select Report and then Save Report.
- Make the report the default report for the page:
- In the Save Report dialog, select As Default Report Settings.
- Select Apply.
- In Save Default Report dialog, select Primary.
- Click Apply.
Next Tutorial
...