Top Banner
This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout Wizard. SIMPLE FORMS
63

This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

Dec 26, 2015

Download

Documents

Lillian Stevens
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout Wizard.

SIMPLE FORMS

Page 2: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

CUSTOMER {CustomerNumber, CustomerName, StreetAddress, Town, Province

Primary Key: CustomerNumber

INVENTORY {InventoryNumber, Description, Colour, QuantityOnHand, Cost}Primary Key: InventoryNumber

SUPPLIER {SupplierNumber, SupplierName, StreetAddress, Town, Province, FreightInArea}Primary Key: SupplierNuymber

SUPP_INV {SupplierNumber, InventoryNumber}Primary Key: SupplierNumber, InventoryNumberForeign Key: SupplierNumber references SUPPLIERForeign Key: InventoryNumber references INVENTORY

INVOICE {InvoiceNumber, SaleDate, CustomerNumber}

Primary Key: InvoiceNumber

Foreign Key: CustomerNumber references CUSTOMER

INVOICE_LINE_ITEM {InvoiceNumber, LineItemNumber, InventoryNumber, Quantity}

Primary Key: InvoiceNumber, LineItemNumber

Foreign Key: InventoryNumber references INVENTORY

Schema of the example database

Page 3: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

P = primary keyF = foreign key

P

P

F

P

P

F

Tables used in this presentation

Page 4: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

P

P & F

Tables used in this presentation, continued

Page 5: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

CUSTOMER

CustomerNumber CustomerName Street Address Town Province Postal Code Company Sales Area

5155 George Black 379 Queen Street W Hamilton Ontario L8C 2B7 1

5204 Stephanie Green 491 Baker Street Toronto Ontario M3C 1J9 2

5255 Alice Van Dunn 296 Orton Avenue Winnipeg Manitoba R3A 8T6 5

5346 Bonnie Stewart 739 Sutton Lane Ottawa Ontario K2G 1V9 3

5389 Jake Solaris 2176 Alcott Crescent Vancouver British Columbia V6A 7G4 6

5443 Jane Quicker 12 Fred Street Montreal Quebec H4G 9E3 4

INVOICE

InvoiceNumber SaleDate CustomerNumber

24789 06/01 5443

24790 06/02 5204

24791 06/09 5155

24792 06/10 5443

24793 06/13 5204

24794 06/15 5204

24795 06/17 5255

24796 06/20 5389

24797 06/23 5255

24798 06/30 5389

INVOICE_LINE_ITEM

InvoiceNumber LineItemNumber InventoryNumber QuantitySold

24789 1 341798 15

24789 2 341785 5

24790 1 341766 10

24791 1 341782 9

24791 2 341784 3

24791 3 341785 10

24792 1 341798 12

24793 1 341785 6

24794 1 341524 5

24794 2 341525 2

24795 1 341524 4

24796 1 341785 8

24797 1 341766 10

24797 2 341798 4

24797 3 341783 2

24798 1 341784 7

Primary KeyForeign Key

Values in the tables

Page 6: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

INVENTORY

InventoryNumber Description Cost SupplierNumber

341524 Washer 700 9961

341525 Dryer 650 9961

341766 Small Refrigerator 500 9876

341767 Medium Refrigerator 650 9876

341768 Large Refrigerator 800 9876

341782 Gas Range 600 9625

341783 Electric Range 600 9625

341784 Barbeque 500 9625

341785 Microwave 150 9625

341798 Freezer 500 9758

SUPPLIER

SupplierNumber SupplierName StreetAddress Town Province Postal Code FreightInArea

9625 Able Company 484 Gain Road Toronto Ontario M9B 3P5 Central

9758 Delta Manufacturers 378 Sleet Boulevard Winnipeg Manitoba R7B 5W2 West

9876 Foxtrot Limited 187 Dock Street Sault Ste. Marie Ontario P6B 4E2 West

9961 Global Exports 2876 Hacker Road Montreal Quebec H1G 6R5 East

9972 Juniper Goods 953 Broad Street Hamilton Ontario L8E 3V7 Central

SUPP_INV

SupplierNumber InventoryNumber

9625 341782

9625 341783

9625 341784

9625 341785

9758 341798

9758 341766

9758 341767

9758 341768

9876 341766

9876 341767

9876 341768

9961 341524

9961 341525

9961 341782

9961 341783

9961 341784

9961 341785

Primary KeyForeign Key

Primary Key & Foreign Key

Values in the tables continued

Page 7: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

EMPLOYEE

EmployeeNumber

EmployeeLast Name

EmployeeFirst

Name

Street Address Town Province Postal Code

Employee

Type

Manager

Number

1000 Johnston Gerald 7145 Quarterly Road Toronto Ontario M6C 8R5 1

1001 Simpson Allison 595 Tatterly Avenue Toronto Ontario M6E 5V8 1 1000

1002 Spinner James 3815 Gottago Street Oakville Ontario L6M 6R3 1 1000

1003 Beef Angus 64 Stockyard Crescent Mississauga Ontario L5L 9G5 1 1000

2000 Brownstone Vincent 4234 Uppity Boulevard Oakville Ontario L6L 7T2 2 1000

2001 Windstorm Jane 6710 Nonesuch Avenue Brampton Ontario L6P 1Y5 2 2000

2002 Higgenbottom Paul 22 Dungeon Street Burlington Ontario L7M 8T5 2 2000

2003 Wormhole Ina 78 Oval Circle Toronto Ontario M3C 9H6 2 2000

3000 Bluecollar Arthur 4572 Higgins Street Brampton Ontario L6R 4K2 3 1000

3001 Blackpants Susan 10 Younger Road Mississauga Ontario L5P 9H3 3 3000

3002 Bottomtop Martha 71345 White Acres Road Markham Ontario L3R 9G2 3 3000

3003 Aboutface George 432 Gasoline Alley Toronto Ontario M4E 1K8 3 3000

EMPLOYEE TYPE

TypeNumber TypeName

1 Administration

2 Sales

3 Manufacturing

SALES AREA

AreaNumber AreaName

1 Central

2 Main

3 East

4 French East

5 West Central

6 West

Page 8: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

Open the Oracle Forms Builder and Logon to the database

Enter File, Connect. The popup will appear as shown on the next

slide.

Page 9: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.
Page 10: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

A new module is shown. This will be later saved under a

desired name.

Select Data Block Wizard in order to create

the Data Block

Page 11: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

Create a Data Block for CUSTOMER

A Data Block contains the fields to be displayed from a selected table.

Page 12: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

Select Table or View

Page 13: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

Browse for the available

tables

Page 14: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

Tables owned by the user.

Select CUSTOMER

Page 15: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

Move all columns but for Postal Code and

Company Sales Area

Page 16: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

The columns have been

moved

Page 17: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

Name the Data Block CUSTOMER

Page 18: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

Continue by using the Layout Wizard

Page 19: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

The Layout Wizard

Page 20: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

Select a New Canvas. This can be given a name at a later time

Select Content. See the next

page for details.

Page 21: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

A canvas is the object on which the graphical user interface (GUI) is drawn, or the background of the form. At run-time, the user only sees those items that have been assigned to a specific canvas. Each canvas is displayed in a specific window. A a frame provides a way to interact with the window including the ability to scroll, move, update etc.

There are five main types of canvases. The three main ones are:

1. Content: Also called the “Base” canvas, is the main and default type of canvas. It occupies the entire window in which it is displayed. Each form should have at least one content canvas.

2. Tab: This allows for a number of tabbed pages to be shown on each canvas. One tab could show Customer, another could show Supplier. The tab is clicked-on to bring up the form. Adds, changes and deletes are allowed.

3. Stacked: One canvas can be stacked upon another so that the user can see several canvasses at the same time. A stacked canvas is stacked on, or displayed on top of, the content canvas. More than one stacked canvas can be displayed at the same time.

Page 22: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

This shows that the Data Block CUSTOMER is being used.

Move all items over

Page 23: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

All columns have been

moved

Page 24: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

The Prompt, Width, and Height can be modified. Modify the Prompt names to a more readable format.

Page 25: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

The Prompt has been modified. The Prompt is the word that appears on the Form.

Page 26: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

Choose the Form layout. The Form layout shows the contents as a

form, not a table.

Tabular layout shows the contents of the table in

table format

Page 27: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

Name the frame CUSTOMER

Allow 5 records to be displayed

Choose to display the Scrollbar

Page 28: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

The form has been created.

Page 29: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

This is what the CUSTOMER Form layout looks like. It can be

modified later.

The Frame Title

Page 30: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

Compile the CUSTOMER Form

Page 31: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

Run the CUSTOMER Form

Page 32: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

The CUSTOMER Form is run in Windows Explorer as a Web application.

The format could be more user-friendly.

It can now be saved and modified.

Page 33: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

File, Save As - CUSTOMER

Page 34: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

MODULE1 will now be named CUSTOMER

Page 35: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

The CUSTOMER module is the active module. CANVAS4 is the canvas,

using the (CUSTOMER) frame

The tool palette will aid in modifying the form

Page 36: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

In the Object Navigator, under Tools, right click on

CUSTOMER. This will bring up the Property Palette

Page 37: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

This is the Property Palette for CUSTOMER. In the palette the

form can be modified

Page 38: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

Notice the black dots around the CUSTOMER frame. Right click to bring up

the Property Palette

The Layout Editor of the CUSTOMER frame

Page 39: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

The Physical properties of the CUSTOMER frame.

Set the width at 530

Page 40: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

The width has been highlighted and set to 530.

Close the screen after setting the width at 530.

Page 41: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

The width has been increased.

Page 42: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

Highlight the Scroll Bar. Right click to bring up the Property Palette

Page 43: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

The Scroll Bar properties.Set the X Position at 520

Page 44: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

The Scroll Bar position has changed. Now the CUSTOMER fields need to be rearranged

Page 45: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

The name field has been highlighted. Right click to bring up the Property Palette.

Page 46: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

Scroll down to the Physical

characteristics.

Page 47: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

Change the X coordinate to 150 and the Y to 29

Page 48: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

All Name fields have been moved

Page 49: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

Highlight the Address field and

change the X coordinate to 350

and Y to 29

Page 50: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

All the Address fields have moved.

Page 51: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

Highlight the Town field and change

the X coordinate to 150 and Y to 43

Page 52: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.
Page 53: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

Highlight the Province field and change the X

coordinate to 350 and Y to 43

Page 54: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.
Page 55: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

The result when the form is run. Click Ctrl-F11 to

show the individual customers in the

CUSTOMER table.

Note: If the user is already logged into the database through SQLPlus, Ctrl_F11 will not work. Thus quit SQLPlus before trying Ctrl_F11.

Page 56: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

The CUSTOMER fields are now filled. Scroll

down to look at the sixth customer.

Page 57: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

File-Save As CUSTOMER

Page 58: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.
Page 59: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

A line has been added with X = 7, Y = 64, and a width of 529

The Line tool.

The Line colour tool. This has been changed to a dark grey

Page 60: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

Three more lines have been added with the following coordinates:1. X = 7, Y = 106, W = 5292. X = 7, Y = 148, W = 5293. X = 7, Y = 190, W = 529

Page 61: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

The final formatted Customer form

Page 62: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

The CUSTOMER Module

Fields in the CUSTOMER Data Block

The CUSTOMER Data Block

Within CANVAS6, FRAME7 can be renamed

CUSTOMER_FRAME

Notice the four lines that have been added as shown in slide 50

Page 63: This presentation shows how to create a simple form from a single table, CUSTOMER. Also show is a way to change the formatting displayed by the Layout.

The renamed CUSTOMER_FRAME

using the Property Palette