 |
|
ss
Oracle Tips by Burleson |
Calendars
Calendars can be built two ways in HTML DB: the
Easy Calendar; and the SQL Calendar.
§
:
Using the Easy Calendar wizard prompts for the table or view to use,
and then asks what column to use as the source for the date, and
another column for what to display in the calendar.
§
:
This wizard asks the developer to provide a query in which to populate
the calendar. The query must select at least two columns and one of
them must be a date. To display aggregated data, such as a count of
records for a date, this wizard will be used to build the query.
The methods for creating both calendars are
similar, so creating the Easy Calendar will not be included in
detail. The following example will create a calendar to display the
count of conference attendees who responded via RSVP on a date. The
query is simple.
select
rsvp_date, count(*) rsvp_count
from conference_rsvp
group by rsvp_date
Creating a Calendar
1.
Navigate to the Easy HTML DB Book application and click on the
Create Page button.
2.
Choose the Calendar option and click Next.
3.
Choose the SQL Calendar option and click Next.
4.
On the Page Attributes screen:
5.
No tabs and click Next.
6.
On the Table / View Owner page, enter the following query and
click Next:
select rsvp_date, count(*)
rsvp_count
from conference_rsvp
group by rsvp_date
7.
On the Date / Display Columns page:
8.
Click Finish.
Run the report. Pressing the Previous button on
the calendar several times will get to the month of September 2005.
That is where the data can be found.
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
http://www.rampant-books.com/book_2005_2_html_db.htm
|