You are on page 1of 37

1

Database Application Development


SSK 3408
Chapter 4
Forms and Reports

Learning Objectives
2








Explain the purpose of forms and reports.


Explain the types of forms and reports.
Explain the basic human factors involved when
designing forms.
Explain the controls to be used on forms.
Describe the basic and complex components of
forms.
Describe the overall structure of reports.

Forms
3

Provides a better interface to users when working


with databases
Makes it easy for non technical users to extract
data from the database
Provides a customizable view that summarizes
data and limits user access as needed

Use of Forms
4






To collect or enter data


Displays results of a query or user request
Displays analysis and computations of stored data
Provides a switchboard (menu) to other forms and
reports
Allows direct manipulation of objects
 Drag

and drop graphical representations of database


relations

Effective Design of Forms


5

Important to understand that forms are the primary


contact to the users
 To

the user, the Form is the system

The form must be tailored for specific tasks/needs


 Designer

must determine the needs of the user as user


may not be aware of the capabilities and limitation of
a modern DBMS.

Research into human factors design provides


guidelines in creating an effective form.

Human Factors Design


6

Basics human factors elements involves:-


1.

User control



The users should always has control over the system.


For example:



2.

Consistency


3.

Let the users decide the sequence in entering data.


User customization such as flexibility in sorting results and data to be
included in reports.

Form layout and button actions are uniform throughout the system.

Clarity



Forms must be well organized, simple and the purpose of the form
must be unambiguous.
For example, if a company refers to its employee as Associates
then use that term instead of Employee.

Human Factors Design ..cont.


7

Aesthetics

4.


Effective use of color and design to provide an attractive


work environment to users.

Feedback

5.


Provide confirmation to user actions through graphical or


auditory responses.

Forgiveness

6.



Require user confirmation on major changes and allow


users to undo or correct mistakes.
For example, deletion confirmation to provide chances to
the user to undo the deletion.

Interface Standards
8

Designing applications that run under Windows


requires a solid understanding of the Windows
Interface.
 To

provide standard controls and operations as offered


by Windows.
 Windows functionality enables us to provide additional
and powerful features within our application.


Standardization guarantees that frequently used


commands provide the same action regardless of
software.

Windows Interface Standards


9

Navigation and Choices


Icons
 Keyboard, Short-cuts
 Menus

 Mouse,

Selections from a list


 Single
 Contiguous

Multiple
 Disjoint Multiple


Focus
 Outline
 Cursor

box

Manipulation
 Activation
 Drag

and Drop

Feedback
 Progress

indicators and
status gauges
 Flashing
 Tool tips
 Status bar
 Message boxes

Window Controls
10

Basic window components:


 Frame

(sizing)
 Title bar
 Control-menu box
 Buttons
 Maximize
 Minimize
 Close
 Scroll

bar

A window consists of several common components.


Other features or commands can be added as required by the tasks.

Windows Menu
11

Menus to provide access to


primary functions for each task
Type of menu:


Drop-down



Short Cut Keys


Mnemonic character

Pop-up (as needed)

Biggest different between a popup and standard, fixed menu is


that a pop-up menu is usually
context sensitive (customized
functions depending on the
selected object)

Message Box
12

Message Boxes






Title
Message
Simple buttons
Icons
Modal (required)

A message box is generally used to interrupt a task


and provides important messages.
A message box can also be a modal form which
forces a user to provide a response

User Interface Accessibility


13

Biggest drawback to the Windows design standard


is accessibility
Graphical approach is inappropriate for physically
challenged users
Certain users require special add-on software to
navigate a computer screen
 E.g.

Screen narration/reader software for the blind

Accessibility Guidelines
14

1.

Provide multiple input


methods




2.

Keyboard
Mouse
Voice

Provide multiple output


methods




Visual
Sound
Color

Some Suggestions:
Beware of high contrast
colors (Red/Green).
 Avoid requiring rapid user
responses.
 Avoid rapid flashing on the
screen.
 Give users customization
options.


Volume
 Color
 Typefaces & Fonts


Form Layout
15

There are many different ways to design forms


and suit them to user tasks.
Each form contains controls that can be used to
perform actions or interact with the forms
Types of Forms


Tabular

Single Row

Sub-forms (one-to-many)

Switchboard

Form
Order

Controls

Items

11
7
13

Dog
Dog
Cat

5
1
2

Tabular Form
16





Works best to display the entire contents of 1 table


Designer can control data entry sequence.
Probably include buttons for sorting.

Single Row (Columnar) Form


17




Data for only one row.


Similar in appearance to
paper forms.
Can use color, graphics, and
command buttons to make
the form easier to use.
Records can be browsed
using navigation buttons
Can be used with sub forms
to show related data from
other tables

Sub-Form
18




Typically a one-to-many relationship.


Sub-form contents are linked to the main form through a
common column (not displayed on the sub-form.)
Can have multiple sub-forms (Independent or Nested).

Multiple Forms
19

An alternative to using sub-forms


A command control is used to display a child form based on
key data of the parent form
Prevents accidental modification deletion of data
Sale
Edit
Customer
FirstName: Mary
LastName: Jones
Address: 123 Oaxaca Ave.

Customer
FirstName: Mary
LastName: Jones
Address: 123 Oaxaca Ave.

Animals Purchased

City: Los Angeles


ZipCode: 90086

Merchandise

Gender: Female
Age: 20
AccountBalance: $150

Switchboard Form
20

A blank form used


as a menu
Normally used to
choose task from a
list of available
actions.
Can also be used to
identify user or
groups

Queries
21

Queries are used to automatically look up data.


 e.g.,

Customer name, Product description

Queries are used in retrieving and updating


data using forms.
Be very careful when using queries.
 Each

form should store data in only one table.


 For multiple tables, use a sub-form or separate
forms.
 Usually lock the look up data (parent form) so it
cannot be changed accidentally.

Query Form Example


22

Clerk enters a CustomerID.


 Stored

in the Order table.

Query joins Sale and Customer.


 Automatically

matches the CustomerID.


 Matching name is displayed on the form.
 Does not display the join column (CustomerID) from
the look up table (Customer).
Customer Order
SaleID 1234
Date 7/25/01
CustomerID 17
Carly

Embry

Form Query: Underlying Tables


23

Customer Order
SaleID 1234
Date 7/25/01
CustomerID 17
Carly

Embry

Data
entry

Data
display
Customer

Sale
SaleID
1232
1233
1234

CustomerID
23
74
17

Sdate
7/24/01
7/24/01
7/25/01

Query
Join

CustomerID
15
16
17

First
Last
Connie Fisher
Rosie Wade
Carly
Embry

Basic Form Controls


24

Label

Text Box

Option Group
(single response)

Command
Button

Combo Box
(click arrow to open)

List Box
(always open)

Complex Form Controls


25

Common







Tab
Grid
Calendar
Gauge
Slider
Spin Box

Calendar

Tab

Grid

Additional



Purchase
Create your own (C++)
Gauge

Slider

Spin box

Pictures
26

Employee


A form can contain 2 types of


pictures:Background pictures


Pictures that are use only for


aesthetic purposes

Pictures stored as data




Pictures that are bound to a data


column and stored in the
database.
A picture can be stored in a
database as an object

Name: Che Zhang


ID: 3354
Phone: 222-111-1524
...
Photo:

Charts
27

A query can be built


to generate data that
can be represented as
a chart.
 Usually

restricted to
numeric data

Charts can be
displayed on forms
and linked to other
forms to see its raw
data

Sale 1
Sale 2
Sale 3

Animal
Animal

Animal

Merchandise
Merchandise

Merchandise

Total Sales
Merchandise
Animals

Data Integrity
28

Avoid relying on forms





Set integrity conditions in table


definitions
Be sure to set referential integrity
(relationships)











Combo/list boxes
Menus
Pop-up forms
Ties to related forms
Data transfer across forms
Computations
Error checking & trapping

Security rights
Data formats



Use forms to make it easy to enter


quality data


Controls

Selectivity




Data entry
Round-off
Visible
Enabled & Locked
Example: no production
change after item is sold.

User assistance





Tool tips
Status bar
Menu
Help--context sensitive

Reports
29

Reports are used to present data and


summarized data
Unlike forms reports do not have controls to
collect data or manipulate data at runtime


Can manipulate data at design time

Main strengths of reports


1.
2.

Reports can easily handle multiple pages of output


Reports can combined both detailed and summarized
data

Report Design Issues


30




Report usage/user needs.


Report layout choices.












Tabular
Columns/Subgroups
Charts/graphs

Paper sizes.
Printer constraints.
How often is it generated?
Events that trigger report?
How large is the report?
Number of copies?
Colors?

Security controls






Distribution list
Unique numbering
Concealed/non-printed data
Secured printers
Transmission limits
Print queue controls

Output concerns


Typefaces

Readability
 Size
 User disabilities


Report Type: Tabular


31

Report Type: Label


32

Report Types: Group or Subtotal


33




Column.
Column with groups.

Report Header
34

Report Header
Page Header

Group Header1

Group Header2









...
Detail
...

Group Footer2

Group Footer1
Page Footer
Report Footer

Report Layout / Common Use


35

Report Header
 Title

pages that are printed one time for entire report.

Page Header
 Title

lines or page notes that are printed at the top of


every page.

Group Header
 Data

for a group (e.g., Order) and headings for the


detail section.

Detail
 Innermost

data.

Report Layout/Common Use ..cont.


36

Group Footer
 Subtotals

for the group.

Page Footer
 Printed

at the bottom of every page--page totals or


page numbers and notes.

Report Footer
 Printed

one time at the end of the report. Summary


notes, overall totals and graphs for entire data set.

Summary
37

Today lesson you have learned how to:


 Explain

the purpose of forms and reports.


 Explain the types of forms and reports.
 Explain the basic human factors involved when
designing forms.
 Explain the controls to be used on forms.
 Describe the basic and complex components of forms.
 Describe the overall structure of reports.

You might also like