Week 4 - California State University, Sacramento

advertisement

Week 4

February 15

• LOV: List of Values

• Dealing with Errors and Problems

• OLE: Object Linking and Embedding

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

1

Working with Multiple Canvases and Data Blocks

Menu

LOV

Window

Items

2

Content canvas

Master Data Block

Detail Data Block

Items

Tab canvas

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

Data block

3

User enters a code

Tab Canvas

How many users will remember all the codes?

Data block

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

Code transferred into box

LOV (list of values)

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

4

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

5

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

6

Principles of Design

A form or reports should...

• Communicate information to the user

• Be flexible to adapt to different needs, levels of experience and knowledge of the intended user

• Be simple, and no simpler

• Perform to match the flow and speed of the user

• Provide assistance to its users through feedback and the ability to undo errors

7

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

Flexibility

Flexibility : The degree to which users can adapt the application to their intended use

– Provide different paths for different levels of experience

8

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

Simplicity

• Hide levels of complexity

• Simplify the common tasks

• Limit the number of interface elements

• Make interface element consistent and cohesive

– Frequency, sequence, importance and function

• Minimize redundancy and complexity of paths

• Use standards to guide users

• Automate data entry to improve reliability

– Default values, list of values , triggers

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

9

Sequence of Events...

• Create the content canvas

– Add the master data block

– Program the triggers

• Create the tab canvas

– Add the detail data block

• Create and attach the LOV (list of values)

• Menu added through inheritance (i.e., call_form)

• Fine tune the form module

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

10

LOV: List of Values

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

11

List of Values (LOV)

• Used to authenticate or automate the selection of values from a list

• Returns values to other items (e.g., data block item)

• Modal (popup) window

• Search function

– Handle large lists

• Can be filled by a query

(dynamic list) or a static list

12

LOV

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

LOV and Record Groups

Manufacturer code Manufacturer Name

LOV

Define

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

Record

Group

13

Creating an LOV

• Create the LOV through the

LOV Wizard

– Build the SQL query that creates the list

– Select and assign the return value to the data block item

• Assign the LOV to the data block

• Program a trigger that will display the LOV

14

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

Creating an LOV

Select the

LOV Wizard

Create

In the Object Navigator , select LOVs

Click on Create in the tool palette

15

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

16

Enter the query

Check your SQL syntax

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

17

Specify the columns for the LOV

Specify the Return Value 18

Prevents the column from appearing in the LOV manufacturers.manufacturer_code

Enter the return value for the data block

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

Assign the Return Item for the Data Block 19

Assign the column to return

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

Object Navigator

LOV will have a record group associated with it

20

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

Record Group

Edit the query through the record group’s property palette

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

21

Assign the LOV to the Data Block 22

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

Assign the LOV to the Data Block 23

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

Program the Trigger

Displays the LOV

24

Executes the query when the OK button is pressed

An alternative to using <F9>

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

The user can either double-click or press <F9> to launch the LOV

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

25

Dealing with Errors and Problems

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

26

Launching a Query 27

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

Ending a Form Without Entering a Query 28

FRM-40353 Error

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

Attempting a Query While Not in Query Mode 29

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

30

FRM-40301 Error

Overcoming Problems with Triggers

• Maximize the MDI and form module windows

• Enter query mode when the form is launched

• Re-enter query mode after every query

• Cancel the query if no query is entered when exiting the form

• Suppress system alerts and messages

31

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

Add and program the

WHEN-NEW-FORM-INSTANCE and

WHEN-NEW-RECORD-INSTANCE triggers

32

Add and program the

WHEN-MOUSE-CLICK trigger

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

Note: This was taken from another form module

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

33

Local variables needed to capture the error code and launch the alert

34

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

Re-enters query mode after a prior query

35

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

Eventually...

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

36

Content canvas

Tab canvas

OLE: Object Linking and Embedding

37

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

Object Linking and Embedding (OLE)

• Allows the developer to link or embed objects within other files objects

– An object can be a document, spreadsheet, graphic

(GIF, TIF, JPEG, etc.), etc.

38

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

OLE Architecture

• Divides tools into OLE servers and containers

– Server - an application that creates and serves OLE objects in other applications

– Container - an application that provides facilities for creation, manipulation and storage of OLE objects

39

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

OLE

Oracle Form

Module

Container

(embedding)

Link

Excel (server)

Spreadsheet (object)

40

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

Access

• Activation - connecting to the server application and using its features to manipulate and display the object

– In-place Activation

• Activates within the container application

• Focus on the object

– External Activation (default)

• Activates within the server application

• Object updated upon close

41

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

Create the OLE Container

Select the Property Palette

OLE Container

Create the OLE Container with the OLE button in the tool palette

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

42

Change the Resize Property 43

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

Assign a File or Application to the OLE 44

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

Opening an Existing File

Select the file

Display an icon in the OLE container

45

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

Double click on the icon

During Runtime 46

Quick Time Player

(designated Windows plug-in) launched to play the movie file

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

R. Ching, Ph.D. • MIS Area • California State University, Sacramento

47

Download