Download presentation
Presentation is loading. Please wait.
Published byLillian Stevens Modified over 9 years ago
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 Wizard. SIMPLE FORMS
2
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, InventoryNumber Foreign Key: SupplierNumber references SUPPLIER Foreign 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
3
P = primary key F = foreign key P P F P P F Tables used in this presentation
4
P P & F Tables used in this presentation, continued
5
CUSTOMER CustomerNumberCustomerNameStreet AddressTownProvincePostal CodeCompany Sales Area 5155George Black379 Queen Street WHamiltonOntarioL8C 2B71 5204Stephanie Green491 Baker StreetTorontoOntarioM3C 1J92 5255Alice Van Dunn296 Orton AvenueWinnipegManitobaR3A 8T65 5346Bonnie Stewart739 Sutton LaneOttawaOntarioK2G 1V93 5389Jake Solaris2176 Alcott CrescentVancouverBritish ColumbiaV6A 7G46 5443Jane Quicker12 Fred StreetMontrealQuebecH4G 9E34 INVOICE InvoiceNumberSaleDateCustomerNumber 2478906/015443 2479006/025204 2479106/095155 2479206/105443 2479306/135204 2479406/155204 2479506/175255 2479606/205389 2479706/235255 2479806/305389 INVOICE_LINE_ITEM InvoiceNumberLineItemNumberInventoryNumberQuantitySold 24789134179815 2478923417855 24790134176610 2479113417829 2479123417843 24791334178510 24792134179812 2479313417856 2479413415245 2479423415252 2479513415244 2479613417858 24797134176610 2479723417984 2479733417832 2479813417847 Primary Key Foreign Key Values in the tables
6
INVENTORY InventoryNumberDescriptionCostSupplierNumber 341524Washer7009961 341525Dryer6509961 341766Small Refrigerator5009876 341767Medium Refrigerator6509876 341768Large Refrigerator8009876 341782Gas Range6009625 341783Electric Range6009625 341784Barbeque5009625 341785Microwave1509625 341798Freezer5009758 SUPPLIER SupplierNumberSupplierNameStreetAddressTownProvincePostal CodeFreightInArea 9625Able Company484 Gain RoadTorontoOntarioM9B 3P5Central 9758Delta Manufacturers378 Sleet BoulevardWinnipegManitobaR7B 5W2West 9876Foxtrot Limited187 Dock StreetSault Ste. MarieOntarioP6B 4E2West 9961Global Exports2876 Hacker RoadMontrealQuebecH1G 6R5East 9972Juniper Goods953 Broad StreetHamiltonOntarioL8E 3V7Central SUPP_INV SupplierNumberInventoryNumber 9625341782 9625341783 9625341784 9625341785 9758341798 9758341766 9758341767 9758341768 9876341766 9876341767 9876341768 9961341524 9961341525 9961341782 9961341783 9961341784 9961341785 Primary Key Foreign Key Primary Key & Foreign Key Values in the tables continued
7
EMPLOYEE Employee Number EmployeeLast Name EmployeeFirst Name Street AddressTownProvincePostal Code Employee Type Manager Number 1000JohnstonGerald7145 Quarterly RoadTorontoOntarioM6C 8R51 1001SimpsonAllison595 Tatterly AvenueTorontoOntarioM6E 5V811000 1002SpinnerJames3815 Gottago StreetOakvilleOntarioL6M 6R311000 1003BeefAngus64 Stockyard CrescentMississaugaOntarioL5L 9G511000 2000BrownstoneVincent4234 Uppity BoulevardOakvilleOntarioL6L 7T221000 2001WindstormJane6710 Nonesuch AvenueBramptonOntarioL6P 1Y522000 2002HiggenbottomPaul22 Dungeon StreetBurlingtonOntarioL7M 8T522000 2003WormholeIna78 Oval CircleTorontoOntarioM3C 9H622000 3000BluecollarArthur4572 Higgins StreetBramptonOntarioL6R 4K231000 3001BlackpantsSusan10 Younger RoadMississaugaOntarioL5P 9H333000 3002BottomtopMartha71345 White Acres RoadMarkhamOntarioL3R 9G233000 3003AboutfaceGeorge432 Gasoline AlleyTorontoOntarioM4E 1K833000 EMPLOYEE TYPE TypeNumberTypeName 1Administration 2Sales 3Manufacturing SALES AREA AreaNumberAreaName 1Central 2Main 3East 4French East 5West Central 6West
8
Open the Oracle Forms Builder and Logon to the database Enter File, Connect. The popup will appear as shown on the next slide.
10
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
11
Create a Data Block for CUSTOMER A Data Block contains the fields to be displayed from a selected table.
12
Select Table or View
13
Browse for the available tables
14
Tables owned by the user. Select CUSTOMER
15
Move all columns but for Postal Code and Company Sales Area
16
The columns have been moved
17
Name the Data Block CUSTOMER
18
Continue by using the Layout Wizard
19
The Layout Wizard
20
Select a New Canvas. This can be given a name at a later time Select Content. See the next page for details.
21
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.
22
This shows that the Data Block CUSTOMER is being used. Move all items over
23
All columns have been moved
24
The Prompt, Width, and Height can be modified. Modify the Prompt names to a more readable format.
25
The Prompt has been modified. The Prompt is the word that appears on the Form.
26
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
27
Name the frame CUSTOMER Allow 5 records to be displayed Choose to display the Scrollbar
28
The form has been created.
29
This is what the CUSTOMER Form layout looks like. It can be modified later. The Frame Title
30
Compile the CUSTOMER Form
31
Run the CUSTOMER Form
32
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.
33
File, Save As - CUSTOMER
34
MODULE1 will now be named CUSTOMER
35
The CUSTOMER module is the active module. CANVAS4 is the canvas, using the (CUSTOMER) frame The tool palette will aid in modifying the form
36
In the Object Navigator, under Tools, right click on CUSTOMER. This will bring up the Property Palette
37
This is the Property Palette for CUSTOMER. In the palette the form can be modified
38
Notice the black dots around the CUSTOMER frame. Right click to bring up the Property Palette The Layout Editor of the CUSTOMER frame
39
The Physical properties of the CUSTOMER frame. Set the width at 530
40
The width has been highlighted and set to 530. Close the screen after setting the width at 530.
41
The width has been increased.
42
Highlight the Scroll Bar. Right click to bring up the Property Palette
43
The Scroll Bar properties. Set the X Position at 520
44
The Scroll Bar position has changed. Now the CUSTOMER fields need to be rearranged
45
The name field has been highlighted. Right click to bring up the Property Palette.
46
Scroll down to the Physical characteristics.
47
Change the X coordinate to 150 and the Y to 29
48
All Name fields have been moved
49
Highlight the Address field and change the X coordinate to 350 and Y to 29
50
All the Address fields have moved.
51
Highlight the Town field and change the X coordinate to 150 and Y to 43
53
Highlight the Province field and change the X coordinate to 350 and Y to 43
55
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.
56
The CUSTOMER fields are now filled. Scroll down to look at the sixth customer.
57
File-Save As CUSTOMER
59
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
60
Three more lines have been added with the following coordinates: 1.X = 7, Y = 106, W = 529 2.X = 7, Y = 148, W = 529 3.X = 7, Y = 190, W = 529
61
The final formatted Customer form
62
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
63
The renamed CUSTOMER_FRAME using the Property Palette
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.