eyad alshareef 1 introduction to form builder part b
TRANSCRIPT
Eyad Alshareef 1
Introduction To Introduction To Form Builder Form Builder
Part BPart B
2Eyad Alshareef
ObjectivesObjectives
Create data block from viewCreate data block from view Modify properties using Property Modify properties using Property
PalettePalette Text item propertiesText item properties
Master-detail relationshipMaster-detail relationship Create master block firstCreate master block first Specify relationship automatically or Specify relationship automatically or
manuallymanually
3Eyad Alshareef
Creating a Form Based Creating a Form Based on a Database Viewon a Database View
View can be derived from one or View can be derived from one or more database tablesmore database tables
Form based on a view allows you to Form based on a view allows you to display data from table(s)display data from table(s)
Form could be used to insert, Form could be used to insert, update, or delete data if the view is a update, or delete data if the view is a simple view only. simple view only.
4Eyad Alshareef
Creating a Form Based Creating a Form Based on on
a Database Viewa Database View Similar to form based on table but read-onlySimilar to form based on table but read-only
Eyad Alshareef 5
Modifying Modifying PropertiesProperties
6Eyad Alshareef
Modifying Form Modifying Form PropertiesProperties
7Eyad Alshareef
Guidelines For Guidelines For Configuring Form Configuring Form
WindowsWindows1.1. Change the window titleChange the window title2.2. Allow user to minimize the windowAllow user to minimize the window3.3. Do not allow the user to maximize the Do not allow the user to maximize the
windowwindow4.4. Do not allow the user to resize the windowDo not allow the user to resize the window5.5. Include horizontal and vertical scrollbars if Include horizontal and vertical scrollbars if
items appear beyond window boundariesitems appear beyond window boundaries6.6. Make the form window fill the Forms Make the form window fill the Forms
Runtime windowRuntime window
8Eyad Alshareef
Configuring Form Configuring Form WindowsWindows
Window Title
Minimize/Maximize buttons
Windowsize
9Eyad Alshareef
Property PaletteProperty Palette
10Eyad Alshareef
Modifying Form Modifying Form PropertiesProperties
Every form object has a Every form object has a Property Property PalettePalette that allows you to configure that allows you to configure form propertiesform properties
PropertyNodes Property List
11Eyad Alshareef
Modifying Form Modifying Form PropertiesProperties
Use Property Palette of form object to modify Use Property Palette of form object to modify desired propertiesdesired properties To access: right click object, select Property Palette To access: right click object, select Property Palette
from menufrom menu Intersection mode modifies properties for multiple Intersection mode modifies properties for multiple
objects at the same timeobjects at the same time To open in intersection mode, select multiple objects To open in intersection mode, select multiple objects
before opening Property Palettebefore opening Property Palette
12Eyad Alshareef
Property PaletteProperty Palette
13Eyad Alshareef
Intersection Property Intersection Property PalettePalette
Used to change property of several Used to change property of several items to the same valueitems to the same value Intersection/Union button appears as Intersection/Union button appears as Name appears as Name appears as **********
14Eyad Alshareef
Frame PropertiesFrame Properties Update LayoutUpdate Layout
AutomaticallyAutomatically Frame items are automatically repositioned based on Frame items are automatically repositioned based on
their order in the Data Blocks list when you move or their order in the Data Blocks list when you move or resize a frame, or modify the form layout using the resize a frame, or modify the form layout using the Layout Wizard in reentrant modeLayout Wizard in reentrant mode
ManuallyManually Items are automatically when layout is modified in Items are automatically when layout is modified in
Layout Wizard in reentrant modeLayout Wizard in reentrant mode Items are not repositioned if you move or resize the Items are not repositioned if you move or resize the
frameframe LockedLocked
Items are never automatically repositionedItems are never automatically repositioned
15Eyad Alshareef
Modifying Text Item Modifying Text Item Properties Using the Properties Using the
Property PaletteProperty Palette Intersection modeIntersection mode
Values appears as **** when objects Values appears as **** when objects have different valueshave different values
Text item properties Text item properties Control how users enter data values Control how users enter data values How form displays data valuesHow form displays data values
HintHint ToolTipToolTip
16Eyad Alshareef
Text item Appearance Text item Appearance PropertiesProperties
17Eyad Alshareef
Text Item Data Value Text Item Data Value PropertiesProperties
18Eyad Alshareef
Text Item Database Text Item Database PropertiesProperties
Eyad Alshareef 19
Master-detail Master-detail relationshiprelationship
20Eyad Alshareef
Data block forms can display data Data block forms can display data from multiple tables that have a from multiple tables that have a master-detail master-detail relationshiprelationship Master record has multiple related Master record has multiple related
detail recordsdetail records Examples:Examples:
One ITEM record has multiple related One ITEM record has multiple related INVENTORY recordsINVENTORY records
One CUSTOMER might have multiple One CUSTOMER might have multiple CUST_ORDER recordsCUST_ORDER records
Multiple-Table FormsMultiple-Table Forms
21Eyad Alshareef
Creating the Detail Data Creating the Detail Data BlockBlock
Master-Detail pageMaster-Detail page Auto-join feature of Data Block Auto-join feature of Data Block
WizardWizard Create link manuallyCreate link manually
Click Create RelationshipClick Create Relationship Explicitly select related itemsExplicitly select related items
Join Condition field syntax:Join Condition field syntax: detail_blockdetail_block..join_itemjoin_item = = master_blockmaster_block..join_itemjoin_item
22Eyad Alshareef
Master block
Detail block
Master-Detail FormsMaster-Detail Forms
23Eyad Alshareef
Multiple Master-Detail Multiple Master-Detail BlocksBlocks
24Eyad Alshareef
Creating a Master-Detail Creating a Master-Detail FormForm
Create the Create the master block master block firstfirst
Specify the Specify the relationship relationship on the Data on the Data Block Wizard Block Wizard Master-Master-Detail page Detail page of the detail of the detail blockblock
25Eyad Alshareef
A master block can have multiple detail A master block can have multiple detail blocksblocks An item can be in multiple customer orders, An item can be in multiple customer orders,
and have multiple shipment recordsand have multiple shipment records A detail block can be a master block in a A detail block can be a master block in a
second master-detail relationshipsecond master-detail relationship A customer can have multiple CUST_ORDER A customer can have multiple CUST_ORDER
recordsrecords One CUST_ORDER record can have multiple One CUST_ORDER record can have multiple
ORDER_LINE recordsORDER_LINE records
Complex Master-Detail Complex Master-Detail RelationshipsRelationships
26Eyad Alshareef
Master
Detail MasterDetail
Complex Master-DetailComplex Master-DetailRelationship ExampleRelationship Example
27Eyad Alshareef
Creating a form based on two Creating a form based on two linked tableslinked tables In order to create a form based on 2 In order to create a form based on 2
tables:tables: Create a form similar to the STUDENT form Create a form similar to the STUDENT form
we created (name it REGISTRATION)we created (name it REGISTRATION) Create an additional data block using a wizardCreate an additional data block using a wizard Establish master-detail relationshipEstablish master-detail relationship
28Eyad Alshareef
Creating a form based on Creating a form based on two linked tablestwo linked tables
Follow the steps suggested by the Follow the steps suggested by the wizardwizard
29Eyad Alshareef
For the STUD_COURSE frame, select tabular For the STUD_COURSE frame, select tabular layout, 4 records per page and a scrollbar.layout, 4 records per page and a scrollbar.
Creating a form based on Creating a form based on two linked tablestwo linked tables
30Eyad Alshareef
Compile and run your Compile and run your formform
Eyad Alshareef 31
Formatting Mask Formatting Mask
32Eyad Alshareef
Formatting Text ItemsFormatting Text Items
Specify desired format mask in text Specify desired format mask in text item Format Mask propertyitem Format Mask property If format mask makes value wider than If format mask makes value wider than
text item Data Width property, data text item Data Width property, data appears as appears as ########## E.g: make the format mask for the empno E.g: make the format mask for the empno
field in the form builder: 99”- - “ 99 and field in the form builder: 99”- - “ 99 and make the data length for the field 4.make the data length for the field 4.
33Eyad Alshareef
Formatting Character Formatting Character Text ItemsText Items
Place embedded characters in Place embedded characters in double quotesdouble quotes
34Eyad Alshareef
Format Mask ExamplesFormat Mask Examples
Value Format Mask ResultValue Format Mask Result
7945 999 ###7945 999 ###
7945 9999$ 7945$7945 9999$ 7945$
7945 99”-”99 79-457945 99”-”99 79-45
34.28 99.9 34.334.28 99.9 34.3
34.28 99.999 34.28034.28 99.999 34.280
SYSDATE Day-MON-YY Friday-NOV-06SYSDATE Day-MON-YY Friday-NOV-06