queries...accounting software, design effective reports, analyze reports in a given system, and...

23
Report Query Tables Figure 6.1 Table, Query, and Report Relationships

Upload: others

Post on 01-Apr-2021

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: QUERIES...accounting software, design effective reports, analyze reports in a given system, and suggest improvements. QUERIES Queries are an important element of relational databases

agents, and products/services in a variety of ways. Reports can be displayed on acomputer screen or printed. This chapter explains the common types of reportsgenerated by an AIS. As users, designers, and evaluators of accounting systems,accountants are expected to understand and be able to interpret a wide variety ofreports. Reports generated by accounting information systems are often unfamiliarto students whose experience is limited primarily to the income statement, balancesheet, and statement of cash flows.

An understanding of various AIS reports will help you as a user of accountingsystems. For example, knowledge of typical reports and common report formatscan help you understand specific reports produced by a package, learn newaccounting software, design effective reports, analyze reports in a given system,and suggest improvements.

QUERIESQueries are an important element of relational databases. You must understandquery features well to make effective use of DBMS software. Exhibit 6.1 summa-rizes a few basic terms that we will use while discussing queries.

242 Part II Understanding and Developing Accounting Systems

Report

Query

Tables

Figure 6.1Table, Query, andReport Relationships

Exhibit 6.1Querying RelationalDatabases

Query languages:AIS developers and users need to be able to communicate their information needsto the DBMS. Natural languages such as English are too imprecise for this purpose.Query languages have been developed to enable users to communicate with theDBMS in more structured formats.

Structured query language (SQL):SQL is a standard language for querying relational databases. Knowledge of SQL willenable you to work with a variety of DBMS software. The basic format of an SQLquery is as follows:

Format SQL Example

SELECT attributes SELECT Order#, Date, Customer#

FROM tables FROM Order

WHERE criteria WHERE Date�#06/01/2003#

This format allows you to (1) specify attributes to include in the output, (2) accessdata from tables based on a condition, and (3) specify the tables from which theattributes used in the criteria can be obtained. The power of relational databases

(continued)

62006_JonesRama_CH06.qxd 5/22/2002 10:28 AM Page 242

Page 2: QUERIES...accounting software, design effective reports, analyze reports in a given system, and suggest improvements. QUERIES Queries are an important element of relational databases

ISBN Title Author

0-127-35124-8 Building Database Applications Cromwell

0-135-22456-7 Management Information Systems Cromwell

Note: For the full Inventory Table, see Table 6.1 on page 244.

246 Part II Understanding and Developing Accounting Systems

Figure 6.2Query by ExampleGrid for QUERY A(Microsoft Accessscreen)

QUERY A: List of all inventory items

This SQL statement represents a structured way of asking the database to giveyou a list of publications by Cromwell expressed in terms of objects that DBMS isfamiliar with. The details of the SQL syntax are beyond the scope of this textbook.Henceforth, we will use QBE as the primary tool for running queries, althoughthere will be an occasional reference to SQL. Under the QBE approach in MS Ac-cess, the system will first prompt you for the table(s) from which your query mustbe answered. Then, you must specify the output criteria on the grid. Figure 6.2shows the QBE in MS Access that accomplishes the same result as the SQL state-ment given earlier for QUERY A. Table 6.3 shows the result of running the queryin Table 6.2 and Figure 6.2 applied to the data in Table 6.1.

Note: The data in the grid were entered by the user.

Table 6.3Results of Query A

62006_JonesRama_CH06.qxd 5/22/2002 10:28 AM Page 246

Page 3: QUERIES...accounting software, design effective reports, analyze reports in a given system, and suggest improvements. QUERIES Queries are an important element of relational databases

254 Part II Understanding and Developing Accounting Systems

GroupedDetail

SimpleLists

GroupSummary

SingleEntity

Report Types

6.3, the user wants the report to be sorted by Vendor ID and wants the details tobe reported. The report is limited to suppliers with a Vendor ID between 120 and131; the event type should be invoices (not payments); and the report should coverinvoices dated between 12/16/03 and 12/31/03. The following discussion on se-lecting and organizing AIS data into reports (including the use of criteria) and thedesign of various types of AIS reports based on data in master and transaction ta-bles can also help you understand and use accounting packages such as Great Plainsmore effectively.

Figure 6.3Great PlainsDynamics Screen forSpecifying ReportCriteria

Figure 6.4 shows the four types of reports based on the organization of thedata in the reports: simple lists, grouped detail, group summary, and single entity.Consider the reporting of sales transactions for Fairhaven Convenience Store. Inthis scenario, a simple list report is a list of sales transactions. Continuing with thisexample, a grouped detail report is a list of sales transactions that are grouped bythe type of product sold, with a subtotal for each product type. A group summaryreport would give only summary sales figures, such as total sales for each product,

Figure 6.4Types of Reports

62006_JonesRama_CH06.qxd 5/22/2002 10:28 AM Page 254

Page 4: QUERIES...accounting software, design effective reports, analyze reports in a given system, and suggest improvements. QUERIES Queries are an important element of relational databases

254 Part II Understanding and Developing Accounting Systems

GroupedDetail

SimpleLists

GroupSummary

SingleEntity

Report Types

6.3, the user wants the report to be sorted by Vendor ID and wants the details tobe reported. The report is limited to suppliers with a Vendor ID between 120 and131; the event type should be invoices (not payments); and the report should coverinvoices dated between 12/16/03 and 12/31/03. The following discussion on se-lecting and organizing AIS data into reports (including the use of criteria) and thedesign of various types of AIS reports based on data in master and transaction ta-bles can also help you understand and use accounting packages such as Great Plainsmore effectively.

Figure 6.3Great PlainsDynamics Screen forSpecifying ReportCriteria

Figure 6.4 shows the four types of reports based on the organization of thedata in the reports: simple lists, grouped detail, group summary, and single entity.Consider the reporting of sales transactions for Fairhaven Convenience Store. Inthis scenario, a simple list report is a list of sales transactions. Continuing with thisexample, a grouped detail report is a list of sales transactions that are grouped bythe type of product sold, with a subtotal for each product type. A group summaryreport would give only summary sales figures, such as total sales for each product,

Figure 6.4Types of Reports

62006_JonesRama_CH06.qxd 5/22/2002 10:28 AM Page 254

Page 5: QUERIES...accounting software, design effective reports, analyze reports in a given system, and suggest improvements. QUERIES Queries are an important element of relational databases

*Primary keys are in boldface, and foreign keys are in italics.The detail table uses two foreign keys as a compound primary key.

Primary ForeignTable Information Attributes Needed Key Key

Manager Last_Name, First_Name, Address, File_Status SSN(tax filing status), Exemptions

Inventory Description, Supplier, Reorder_Point, Product#Quantity_On_Hand

Sale Date, Sales_Tax Sale# SSN

Sale_ Quantity_Sold, Price Sale#/Product# Sale#Detail Product#

Deposit Date, Amount Deposit# SSN

255Understanding and Designing Queries and Reports Chapter 6

(m,1)

(1,m)

(m,1)

(m,1)InventoryProduct#

DepositDeposit#

SSN

ManagerSSN

SaleSale#

SSN

Sale_DetailSale#

Product#

without listing individual sales transactions. Finally, a single entity report wouldprovide details about only one event, such as a sales invoice.

We can also classify reports based on the type of data in the report. Some re-ports may be designed to present information about events. Other reports may fo-cus on data in master tables and present reference and summary data in masterrecords.

First, we review the format (layout) of a report to understand the elements ofa typical AIS report. Then, we consider the following questions related to reportdesign: (1) What data are included in a report? and (2) How are the data orga-nized? As we discuss these issues, we will develop a template that you can use todocument report design for AIS. We will use this template in the following two sec-tions to document the design of each of the eight types of reports.

We will use Fairhaven Convenience Store in our discussion of reports. Reviewthe design of the tables for this example in Figure 6.5 and the sample data in Table6.6 before reading further. Also, review the sample status report in Figure 6.6A onpage 258. We will continue to use this example as we discuss issues related to re-port data, organization, and layout.

Figure 6.5UML Class Diagramand Attributes forFairhavenConvenience Store

62006_JonesRama_CH06.qxd 5/22/2002 10:28 AM Page 255

Page 6: QUERIES...accounting software, design effective reports, analyze reports in a given system, and suggest improvements. QUERIES Queries are an important element of relational databases

*Text in italics represents data that is taken from a table or calculated (e.g. Sale#). Other text in the reportis either a label (e.g., PRODUCT#) or calculation.

Figure 6.6A shows the report that was generated using this design.

258 Part II Understanding and Developing Accounting Systems

Detailed Inventory Status ReportDate: 12/16/03 Product Range: 101-103

PRODUCT# DESCRIPTION SUPPLIER BEGIN_OH

102 Engine oil Mobil 100

Transaction# Date Quantity Sold 202 12/15/03 2 204 12/16/03 1Current Quantity on Hand 97

Transaction# Date Quantity Sold 201 12/15/03 13 202 12/15/03 14 203 12/15/03 10Current Quantity on Hand 9,963

(Etc.)

Page 1

101 Regular gas Shell 10,000

Report header

Page header

Group detail

Page footer

Group footer

Group header

Figure 6.6A Grouped Detail Status Report

Report Header

Group Header — by Product#

Page Header

Detail

Group Footer — by Product#

Page Footer

Detailed Inventory Status Report

Date: 12/16/03 Product Range: 101-103

Product# Description Vendor Begin_OH

Product# Description Vendor Begin_OH

Transaction# Date Quantity Sold

Transaction# Date Quantity Sold

Current Quantity On Hand �(Begin_OH) �Sum(Quantity_Sold)

= [Page]

Figure 6.6B shows the elements of this report as they would appear in “design view”under Microsoft Access.

Figure 6.6BDesign of GroupedDetail Status Report*

62006_JonesRama_CH06.qxd 5/22/2002 10:28 AM Page 258

Page 7: QUERIES...accounting software, design effective reports, analyze reports in a given system, and suggest improvements. QUERIES Queries are an important element of relational databases

262 Part II Understanding and Developing Accounting Systems

GroupedDetail

(Figure 6.10)

SimpleEvent List(Figure 6.9)

GroupSummary(Figure 6.11)

SingleEvent

(Figure 6.12)

Events

EVENT REPORTSThe previous section discussed the information content and organization of reports.In this section and the next, we will explain several common types of AIS reports,using the previously described layout and report design template. We will focus onevent reports that list or summarize event data available in transaction tables. Eventreports draw on data available in transaction tables for most of their content. Ex-amples of such reports include purchase orders, purchase invoices, purchase returns,sales orders, sales invoices, sales returns, shipments, cash receipts, and productionreports. Figure 6.7 classifies event reports according to the four report types iden-tified earlier in Figure 6.4 on page 254.

Figure 6.7Event ReportsClassified byStructure

Service_Request_

DetailRequest#Service#

ServicesService#

Service_RequestRequest#Client#

Accountant#

InvoiceInvoice#

Engagement#

ClientClient#

AccountantEmployee#

(m,1)(1,m)

(m,1)

(m,1)

(1,1)

Figure 6.8UML Class Diagramand Attributes forH & J Tax PreparationService

Criteria are used to restrict output to specific events. Typical criteria that canbe used in such reports involve specifying a range of agents, products/services, eventtypes, and dates for event reports. For example, we could prepare a list of ordersfor customers in a particular region only. In the following examples, we have spec-ified a date range for the event reports.

Throughout this section, we will use the example processes from Chapter 5 asfollows:

▪ As each type of report is introduced, we will demonstrate the design usingFairhaven Convenience Store. Recall that its UML class diagram and attrib-utes were presented in Figure 6.5 on page 255, and the sample data werepresented in Table 6.6 on page 256.

▪ Focus on Problem Solving 6.d on page 266 is based on the H & J TaxPreparation Service scenario to help you practice these concepts. The UMLclass diagram and attributes are given in Figure 6.8, and the sample data arepresented in Table 6.9.

(continued)

62006_JonesRama_CH06.qxd 5/22/2002 10:28 AM Page 262

Page 8: QUERIES...accounting software, design effective reports, analyze reports in a given system, and suggest improvements. QUERIES Queries are an important element of relational databases

262 Part II Understanding and Developing Accounting Systems

GroupedDetail

(Figure 6.10)

SimpleEvent List(Figure 6.9)

GroupSummary(Figure 6.11)

SingleEvent

(Figure 6.12)

Events

EVENT REPORTSThe previous section discussed the information content and organization of reports.In this section and the next, we will explain several common types of AIS reports,using the previously described layout and report design template. We will focus onevent reports that list or summarize event data available in transaction tables. Eventreports draw on data available in transaction tables for most of their content. Ex-amples of such reports include purchase orders, purchase invoices, purchase returns,sales orders, sales invoices, sales returns, shipments, cash receipts, and productionreports. Figure 6.7 classifies event reports according to the four report types iden-tified earlier in Figure 6.4 on page 254.

Figure 6.7Event ReportsClassified byStructure

Service_Request_

DetailRequest#Service#

ServicesService#

Service_RequestRequest#Client#

Accountant#

InvoiceInvoice#

Engagement#

ClientClient#

AccountantEmployee#

(m,1)(1,m)

(m,1)

(m,1)

(1,1)

Figure 6.8UML Class Diagramand Attributes forH & J Tax PreparationService

Criteria are used to restrict output to specific events. Typical criteria that canbe used in such reports involve specifying a range of agents, products/services, eventtypes, and dates for event reports. For example, we could prepare a list of ordersfor customers in a particular region only. In the following examples, we have spec-ified a date range for the event reports.

Throughout this section, we will use the example processes from Chapter 5 asfollows:

▪ As each type of report is introduced, we will demonstrate the design usingFairhaven Convenience Store. Recall that its UML class diagram and attrib-utes were presented in Figure 6.5 on page 255, and the sample data werepresented in Table 6.6 on page 256.

▪ Focus on Problem Solving 6.d on page 266 is based on the H & J TaxPreparation Service scenario to help you practice these concepts. The UMLclass diagram and attributes are given in Figure 6.8, and the sample data arepresented in Table 6.9.

(continued)

62006_JonesRama_CH06.qxd 5/22/2002 10:28 AM Page 262

Page 9: QUERIES...accounting software, design effective reports, analyze reports in a given system, and suggest improvements. QUERIES Queries are an important element of relational databases

Table 6.9 Sample Data for H & J Tax Preparation Service

Services Table

263Understanding and Designing Queries and Reports Chapter 6

Figure 6.8Concluded

Primary Foreign InformationalTable Key Key(s) Attributes

Services Service# Description,Fee,Year-to-Date_Revenues

Client Client# Client_Name,Address,Telephone, Beg_Bal

Accountant Accountant# Accountant_Name

Service_Request Request# Client#, Accountant# Date

Invoice Invoice# Request# Date,Amount

Service_Request_Detail Request# Same as keys in FeeService# compound primary

key

(continued)

Year-to-DateService# Service_Description Fee _Revenues

1040 Federal Individual Income Tax Form 1040 (long form) $100 $120,000

Sch-A 1040 Schedule A (itemized deductions) $ 50 $ 51,000

Sch-B 1040 Schedule B (interest & dividend earnings) $ 50 $ 53,300

Sch-C 1040 Schedule C (sole proprietorship) $110 $ 84,000

State State Income Tax Return $ 80 $ 81,000

Corp Corporate Income Tax $30 (per hr.) $103,000

Client Table

Client# Client_Name Address Telephone Beg_Bal

1001 Robert Barton 242 Greene St., St. Louis, MO 314-222-3333 $0

1002 Donna Brown 123 Walnut St., St. Louis, MO 314-541-3322 $0

1003 Sue Conrad 565 Lakeside, St. Louis, MO 314-541-6785 $0

62006_JonesRama_CH06.qxd 5/22/2002 10:28 AM Page 263

Page 10: QUERIES...accounting software, design effective reports, analyze reports in a given system, and suggest improvements. QUERIES Queries are an important element of relational databases

Content and Organization

Title on Report Header Inventory Sales

Type of Report Simple event list

Source by Table Sale_Detail (SD) Sale (S)

1. Attributes displayed on Sale#, Product#,report Quantity_Sold, Price

2a. Attributes not displayed onreport, but necessary for acalculation

2b. Criteria for selection of Date�#12/14/2003# ANDrecords in table Date�#12/17/2003#

3. Foreign keys that link this Product#table to the others used in the Sale#report (if any)

Content Placement Attribute Names and Calculations* Used

Report header No attributes or calculations

Report details SD: Sale#, Product#, Quantity_Sold, PriceCalculation: Extended_Price*

Order by SD: Sale#

Report footer Calculation: Total*

For grouped detail reports:

Group by

Group header

Group detail

Order detail by

Group footer

*Formulas for calculations:

Extended_Price � Quantity_Sold � PriceTotal � Sum (Extended_Price)

265Understanding and Designing Queries and Reports Chapter 6

Inventory SalesDates: 12/15/03–12/16/03; Order by: Sale#Sale# Product# Quantity Sold Price Extended Price

201201202

202203204

101103101

102101102

131

14

2101

$2.001.501.50

3.002.003.00

Total

$26.001.50

21.00

6.0020.003.00

$77.50

Figure 6.9Simple Event List Layout

62006_JonesRama_CH06.qxd 5/22/2002 10:28 AM Page 265

Page 11: QUERIES...accounting software, design effective reports, analyze reports in a given system, and suggest improvements. QUERIES Queries are an important element of relational databases

Content and Organization

Title on Report Header Inventory Sales by Product#

Type of Report Grouped event detail report

Source by Table Sale_Detail (SD) Sale (S)

1. Attributes displayed on Product#,report Quantity_Sold, Price,

Sale#

2a. Attributes not displayed onreport, but necessary for acalculation

2b. Criteria for selection of Product#�100 AND Date�#12/14/2003# ANDrecords in table Product#�104 Date�#12/17/2003#

3. Foreign keys that link this Sale#table to the others used inthe report (if any)

Content Placement Attribute Names and Calculations* Used

Report header No attributes

Report details See group details

Order by Product#

Report footer No attributes

For grouped detail reports:

Group by SD: Product#

Group header SD: Product#

267Understanding and Designing Queries and Reports Chapter 6

Inventory Sales by Product#Dates: 12/15/03–12/16/03; Products: 101–103 Group by Product#

Sale# Quantity Sold Price Extended Price

Product 101:201201202

131410

Subtotal 37

$2.001.502.00

$26.0021.0020.00

$67.00

Product 102:202204

21

Subtotal 3

$3.00$3.00

$6.003.00

$9.00

Product 103:201 1

Subtotal 1$1.50 $1.50

$1.50

attribute, is required if we want the list to include events over a particular period.Any criteria used to select information should be shown on the report to informthe user of these criteria. As shown in the layout, the starting and ending dates ofthe events could be listed in the report header.

Figure 6.10Grouped Event DetailReport

(continued)

62006_JonesRama_CH06.qxd 5/22/2002 10:28 AM Page 267

Page 12: QUERIES...accounting software, design effective reports, analyze reports in a given system, and suggest improvements. QUERIES Queries are an important element of relational databases

To practice the design of grouped event detail reports:

▪ Review the design of a grouped event detail report in Figure 6.10 forFairhaven Convenience Store. Recall that the UML class diagram and attrib-utes were presented in Figure 6.5 on page 255, and the sample data weregiven in Table 6.6 on page 256.

▪ Complete the requirements in box 6.e based on the H & J Tax PreparationService scenario. Recall that the UML class diagram and attributes were pre-sented in Figure 6.8 on pages 262–263, and the sample data were given inTable 6.9 on pages 263–264.

Focus on Problem Solving 6.e

Creating a Grouped Event Detail Report (P3)H & J Tax Preparation Service

Required:1. Create a sample grouped event detail report with an appropriate layout for H & J Tax Prepara-

tion Service that shows the different services requested by clients during the month of February.Use the data in Table 6.9. The report should show the Service#, Request#, and Fee. It should alsoorganize information by Service# and show the total fees from each type of service.

2. Document the content and organization of the report in terms of the underlying tables. Use theformat in Exhibit 6.3 on page 261.

The solution to this Focus on Problem Solving box appears on pages 289–290. Check your answer and make sure you un-derstand the solution before reading further.

Group Event Summary ReportA group event summary report summarizes event data by various parameters. Ex-amples include sales summarized by month, or sales summarized by customer. Sum-mary reports present only summary information (e.g., monthly sales); they do notshow the details of each event. Figure 6.11 provides an example. Sales are sum-marized over the period 12/15/03–12/16/03. No data are given about the individ-

268 Part II Understanding and Developing Accounting Systems

Group detail SD: Sale#, Quantity_Sold, PriceCalculation: Extended_Price*

Order detail by SD: Sale#

Group footer Calculation: Subtotal*

*Formulas for calculations:

Extended_Price � Quantity_Sold � Price in Sales_Detail TableSubtotal � Sum (Extended_Price) for each product

For grouped detail reports:

Figure 6.10Concluded

62006_JonesRama_CH06.qxd 5/22/2002 10:28 AM Page 268

Page 13: QUERIES...accounting software, design effective reports, analyze reports in a given system, and suggest improvements. QUERIES Queries are an important element of relational databases

Content and Organization

Title on Report Header Sales Summarized by Product#

Type of Report Group event summary report

Source by Table Sale_Detail (SD) Sale (S)

1. Attributes displayed on Product#report

2a. Attributes not displayed on Price, Quantity_Soldreport, but necessary for acalculation

2b. Criteria for selection of Product#�100 AND Date�#12/14/2003# ANDrecords in table Product#�104 Date�#12/17/2003#

3. Foreign keys that link this Sale#table to the others used in thereport (if any)

Content Placement Attribute Names and Calculations* Used

Report header No attributes

Report details SD: Product#Calculation: Total_Quantity,* Total_Sales*

Order by SD: Product#

Report footer No attributes

For grouped detail reports: No detail reported

Group by

Group header

Group detail

Order detail by

Group footer

*Formulas for calculations:

Total_Quantity � Sum (Quantity_Sold) in the selected records for the particular productTotal_Sales � Sum (Quantity_Sold � Price) in the selected records for the particular product

269Understanding and Designing Queries and Reports Chapter 6

Sales Summarized by Product#Dates: 12/15/03–12/16/03 Products: 101–103 Type: Sales Summarize by: Product#

Product# Total Quantity Total Sales

101102103

3731

$67.009.001.50

Figure 6.11Group EventSummary Report

ual events themselves. Group event summary reports can be superior to groupedevent detail reports when a large number of groups needs to be reported. For ex-ample, if there were 200 products, a grouped event detail report would be quitelong. It may be that the first step in analyzing sales would be to obtain a sales sum-mary and then look at details for individual products as needed.

To practice the design of group event summary reports,

62006_JonesRama_CH06.qxd 5/22/2002 10:28 AM Page 269

Page 14: QUERIES...accounting software, design effective reports, analyze reports in a given system, and suggest improvements. QUERIES Queries are an important element of relational databases

▪ Review the design of a group event summary report in Figure 6.11 forFairhaven Convenience Store. Recall that the UML class diagram and attrib-utes were presented in Figure 6.5 on page 255, and the sample data weregiven in Table 6.6 on page 256.

▪ Complete the requirements in box 6.f based on the H & J Tax PreparationService scenario. Recall that the UML class diagram and attributes were pre-sented in Figure 6.8 on pages 262–263, and the sample data were given inTable 6.9 on pages 263–264.

Focus on Problem Solving 6.f

Creating a Group Event Summary Report (P3)H & J Tax Preparation Service

Required:1. Prepare a sample group event summary report with an appropriate layout for H & J Tax Prepara-

tion Service that shows the different services requested by clients during the month of February. Usethe information in Table 6.9. The report should organize information by Service# and show the to-tal fees from each type of service. Details of sales of various types of services should not be included.

2. Document the content and organization of the report in terms of the underlying tables. Use theformat in Exhibit 6.3 on page 261.

3. Compare the report that you designed in Questions 1 and 2 with the report designed in responseto the questions in box 6.e on page 290.

The solution to this Focus on Problem Solving box appears on pages 290–291. Check your answer and make sure you un-derstand the solution before reading further.

Single Event ReportA single event report gives details about a single event. Often, these reports areprinted for documentation purposes or to give to customers or suppliers. Examplesof this type of report include sales invoices and purchase orders. Figure 6.12 pro-vides the detail for a single sale at Fairhaven Convenience Store. The documentcould be given to the customer as a receipt. The data for this report come from theInventory table (for product description), Sale Table (date and payment informa-tion) and Sale_Detail Table (Product, Quantity and Price).

270 Part II Understanding and Developing Accounting Systems

ReceiptFairhaven Convenience Store

Product# Description Quantity Sold Price Extended Price

101103 SubtotalTax Total

Regular gasAntifreeze

$2.001.50

$26.00 1.50$27.50 0.83$28.33

Sale#: 201 Date: 12/15/03

131

Figure 6.12Single Event Report(Document)

(continued)

62006_JonesRama_CH06.qxd 5/22/2002 10:28 AM Page 270

Page 15: QUERIES...accounting software, design effective reports, analyze reports in a given system, and suggest improvements. QUERIES Queries are an important element of relational databases

To practice the design of single event reports:

▪ Review the design of a single event report in Figure 6.12 for FairhavenConvenience Store. Recall that the UML class diagram and attributes werepresented in Figure 6.5 on page 255, and the sample data were given inTable 6.6 on page 256.

▪ Complete the requirements in box 6.g based on the H & J Tax PreparationService scenario. Recall that the UML class diagram and attributes were

271Understanding and Designing Queries and Reports Chapter 6

Figure 6.12Concluded Content and Organization

Title on Report Header Receipt

Type of Report Single event report

Source by Table Sale_Detail (SD) Sale (S) Inventory (I)

1. Attributes displayed on Product#, Sale#, Date Descriptionreport Quantity_Sold, Price

2a. Attributes not displayedon report, but necessaryfor a calculation

2b. Criteria for selection of Sale beingrecords in table processed

currently

3. Foreign keys that link this Sale#, Product#table to the others used inthe report (if any)

Content Placement Attribute Names and Calculations* Used

Report header S: Sale#, Date

Report details SD: Product#, Quantity_Sold, Price I: DescriptionCalculation: Extended_Price*

Order by SD: Product#

Report footer S: Type, Account#Calculations: Subtotal,* Tax,* Total*

For grouped detail reports:

Group by

Group header

Group detail

Order detail by

Group footer

*Formulas for calculations:

Extended_Price � Quantity_Sold � Price in each Sale_Detail record.Subtotal � Sum (Extended_Price) for all Sale_Detail records for a single sale.Tax � 0.03 � SubtotalTotal � Subtotal � Tax

62006_JonesRama_CH06.qxd 5/22/2002 10:28 AM Page 271

Page 16: QUERIES...accounting software, design effective reports, analyze reports in a given system, and suggest improvements. QUERIES Queries are an important element of relational databases

Reference ListsReference lists report only reference data that are taken from master tables. Recallfrom an earlier chapter that reference data are not affected by events. Thus, infor-

272 Part II Understanding and Developing Accounting Systems

Product, Service, or Agent

GroupedDetail

(Figures 6.6Aand 6.6B)

ReferenceList

(Figure 6.14)

GroupSummary(Figure 6.15)

Single Product,Service,AgentEntity

(Figure 6.16)

Status Reports

Figure 6.13Types of Product/Service/AgentReports

presented in Figure 6.8 on pages 262–263, and the sample data were given inTable 6.9 on pages 263–264.

Focus on Problem Solving 6.g

Creating a Single Event Report (P3)H & J Tax Preparation Service

Required:1. Prepare an invoice with an appropriate layout for H & J Tax Preparation Service. Prepare it for

Invoice# 305 (Request# 104).2. Document the content and organization of the report in terms of the underlying tables. Use the

format in Exhibit 6.3 on page 261.

The solution to this Focus on Problem Solving box appears on pages 291–292. Check your answer and make sure you un-derstand the solution before reading further.

REFERENCE LISTS AND STATUS REPORTSUnlike event reports that focus on organizing and summarizing event data, refer-ence lists and status reports focus on providing information about products, ser-vices, or agents. Four types of reports that focus on organizing and summarizingmaster table data are classified in Figure 6.13. Each of these types is discussed withexamples in this section. Again, we use report layouts and the report design tem-plate in Exhibit 6.3 on page 261 to describe each report.

As with event reports, criteria can be used to restrict the output to specific prod-ucts, services, or agents. Typical criteria that can be used in such reports includespecifying a range of agents, products and services, and the date of the report.

62006_JonesRama_CH06.qxd 5/22/2002 10:28 AM Page 272

Page 17: QUERIES...accounting software, design effective reports, analyze reports in a given system, and suggest improvements. QUERIES Queries are an important element of relational databases

Content and Organization

Title on Report Header Inventory Reference List

Type of Report Reference list

Source by Table Inventory

1. Attributes displayed on Product#, Description, Supplier, Reorder_Pointreport

2a. Attributes not displayed onreport, but necessary for acalculation

2b. Criteria for selection of Product#�100 AND Product#�104records in table

3. Foreign keys that link thistable to the others used inthe report (if any)

Content Placement Attribute Names and Calculations* Used

Report header No attributes or calculations

Report details I: Product#, Description, Supplier, Reorder_Point

Order by Product#

Report footer No attributes or calculations

For grouped detail reports:

Group by

Group header

Group detail

Order detail by

Group footer

*Formulas for calculations:

273Understanding and Designing Queries and Reports Chapter 6

mation about balances or quantity on hand would not be included in these reports.Examples include a list of customers with name and address, a list of suppliers, a listof products sold, and a chart of general ledger accounts. Figure 6.14 provides an ex-ample of a reference list. A list such as this might be useful to someone who wantedto quickly find out what kinds of engine oil are available to customers. (Figure 6.14is unrealistic, in that the list is quite short and only one kind of gas, oil, and an-tifreeze is available.) All the data for this report come from the Inventory Table.

Figure 6.14Reference List

Inventory Reference ListProduct Range: 101–103 Order by: Product#

Product# Description Supplier Reorder Point

101102103

Regular gasEngine oilAntifreeze

ShellMobilDow

1,0005030

62006_JonesRama_CH06.qxd 5/22/2002 10:28 AM Page 273

Page 18: QUERIES...accounting software, design effective reports, analyze reports in a given system, and suggest improvements. QUERIES Queries are an important element of relational databases

Content and Organization

Title on Report Header Summary Inventory Status Report

Type of Report Summary status report

Source by Table Sale_Detail (SD) Inventory (I)

1. Attributes displayed Product#, Description, Supplier,on report Reorder_Point

2a. Attributes not displayed Quantity_Sold Begin_OH*on report, but necessaryfor a calculation

2b. Criteria for selection of Product#�100 ANDrecords in table Product#�104

3. Foreign keys that link Product#, Sale#this table to the othersused in the report (if any)

Content Placement Attribute Names and Calculations* Used

Report header No attributes or calculations

Report details I: Product#, Description, Supplier, Reorder_PointCalculation: Quantity_On_Hand*

Order by I: Product#

Report footer No attributes or calculations

For grouped detail reports:

Group by

Group header

Group detail

Order detail by

Group footer

*Formulas for calculations:

Quantity_On_Hand � Begin_OH (from Inventory Table for the particular product) � Sum(Quantity_Sold) from Sales_Detail Table for the particular product

277Understanding and Designing Queries and Reports Chapter 6

Summary Inventory Status ReportDate: 12/16/03 Product Range: 101–103

Product# Description Supplier Reorder Point Quantity On Hand

101102103

Regular gasEngine oilAntifreeze

ShellMobilDow

10,0005030

9,96397

9

Figure 6.15Summary StatusReport

62006_JonesRama_CH06.qxd 5/22/2002 10:28 AM Page 277

Page 19: QUERIES...accounting software, design effective reports, analyze reports in a given system, and suggest improvements. QUERIES Queries are an important element of relational databases

Content and Organization

Title on Report Header Inventory Status

Type of Report Single product/service/agent status report

Source by Table Sales (S) Sales_Detail (SD) Inventory (I)

1. Attributes displayed on Date Sale#, Product#, Descrip-report Quantity_Sold tion, Supplier,

Begin_OH

2a. Attributes not displayedon report, but necessaryfor a calculation

2b. Criteria for selection of Product#�101records in table

3. Foreign keys that link this Product#table to the others used Sale#in the report (if any)

Content Placement Attribute Names and Calculations* Used

Report header I: Product#, Description, Supplier

Report details SD: Sale#, Quantity_Sold S: Date

Order by SD: Sale#

Report footer Ending_Quantity*

For grouped detail reports:

Group by

Group header

Group detail

Order detail by

Group footer

*Formulas for calculations:

Ending_Quantity � Begin_OH � Sum (Quantity_Sold)

279Understanding and Designing Queries and Reports Chapter 6

Inventory StatusDate: 12/16/03

Product#: 101 Regular gasSupplier: Shell

Beginning Quantity 10,000 Sale# Date Quantity Sold

201 12/15/03 �13 202 12/15/03 �14 203 12/15/03 �10 �37Ending Quantity 9,963

Figure 6.16Single Product/Service/Agent StatusReport (Document)

62006_JonesRama_CH06.qxd 5/22/2002 10:29 AM Page 279

Page 20: QUERIES...accounting software, design effective reports, analyze reports in a given system, and suggest improvements. QUERIES Queries are an important element of relational databases

SELECT, FROM, and WHERE commands. A query design template (Exhibit 6.2)was suggested for thinking about and documenting query parameters. Both singleand multiple-table queries were considered.

The second section of the chapter was devoted to report design. We saw thatinformation can be obtained from a query for use in a report. A report is a for-matted presentation of information. We looked at report elements such as reportheaders, report footers, group headers, group detail, and group footers. Four typesof report formats were introduced: simple lists, grouped detail reports, group sum-mary reports, and single entity reports. These four classifications were applied toreports that were primarily focused on events, as well as reports that were focusedon products, services, and agents. A report design template (Exhibit 6.3) was usedto help organize data and format requirements for various reporting needs. Twosummary figures, Figures 6.17 and 6.18, recap the eight sample reports that wereintroduced throughout this chapter.

Chapter 6 is the second of a three-chapter part intended to develop your un-derstanding about how accounting information systems work and how they can bedeveloped. Chapter 6 emphasized data output; Chapter 7 will examine data input,including the design of forms and internal control over data entry.

281Understanding and Designing Queries and Reports Chapter 6

Inventory SalesDates: 12/15/03–12/16/03; Order by: Sale#Sale# Product# Quantity Price Extended Price

201201202

101103101

131

14—

$2.001.501.50

Total

$26.001.50

21.00—

$77.50

Inventory Sales by Product#Dates: 12/15/03–12/16/03 Products: 101–103 Group by: Product#

Sale# Quantity Sold Price Extended Price

Product 101201202203

131410

Subtotal 37

$2.001.502.00

$26.0021.0020.00

$67.00

Product 102202204

21

Subtotal 3

$3.003.00

$6.003.00

$9.00

Figure 6.17Examples of FourKinds of EventReports

Simple Event List (from Figure 6.9 on page 265)

Grouped Event Detail Report (from Figure 6.10 on pages 267–268)

(continued)

62006_JonesRama_CH06.qxd 5/22/2002 10:29 AM Page 281

Page 21: QUERIES...accounting software, design effective reports, analyze reports in a given system, and suggest improvements. QUERIES Queries are an important element of relational databases

Grouped Detail Status Report (from Figure 6.6A on page 258)

282 Part II Understanding and Developing Accounting Systems

Figure 6.17Concluded Group Event Summary Report (from Figure 6.11 on page 269)

Single Event Report (Document) (from Figure 6.12 on pages 270–271)

Sales Summarized by Product#Dates: 12/15/03–12/16/03 Products: 101–103 Type: Sales Summarize by: Product#

Product# Total Quantity Total Sales

101102103

3731

$67.009.001.50

ReceiptFairhaven Convenience Store

Product# Description Quantity Sold Price Extended Price

101103 SubtotalTax Total

Regular gasAntifreeze

$2.001.50

$26.00 1.50$27.50 0.83$28.33

Sale#: 201 Date: 12/15/03

131

Figure 6.18Examples of FourKinds of Product/Service/AgentReports

Reference List (from Figure 6.14 on page 273)

Inventory Reference ListProduct Range: 101–103 Order by: Product#

Product# Description Supplier Reorder Point

101102103

Regular gasEngine oilAntifreeze

ShellMobilDow

1,0005030

Detailed Inventory Status ReportDate: 12/16/03 Product Range:101–103

Product# Description Supplier Begin OH

102 Engine oil Mobil 100

Transaction# Date Quantity Sold 202 12/15/03 2 204 12/16/03 1Current Quantity On Hand 97

Transaction# Date Quantity Sold 201 12/15/03 13 202 12/15/03 14 203 12/15/03 10Current Quantity On Hand 9,963

(Etc.)

101 Regular gas Shell 10,000

62006_JonesRama_CH06.qxd 5/22/2002 10:29 AM Page 282

Page 22: QUERIES...accounting software, design effective reports, analyze reports in a given system, and suggest improvements. QUERIES Queries are an important element of relational databases

Grouped Detail Status Report (from Figure 6.6A on page 258)

282 Part II Understanding and Developing Accounting Systems

Figure 6.17Concluded Group Event Summary Report (from Figure 6.11 on page 269)

Single Event Report (Document) (from Figure 6.12 on pages 270–271)

Sales Summarized by Product#Dates: 12/15/03–12/16/03 Products: 101–103 Type: Sales Summarize by: Product#

Product# Total Quantity Total Sales

101102103

3731

$67.009.001.50

ReceiptFairhaven Convenience Store

Product# Description Quantity Sold Price Extended Price

101103 SubtotalTax Total

Regular gasAntifreeze

$2.001.50

$26.00 1.50$27.50 0.83$28.33

Sale#: 201 Date: 12/15/03

131

Figure 6.18Examples of FourKinds of Product/Service/AgentReports

Reference List (from Figure 6.14 on page 273)

Inventory Reference ListProduct Range: 101–103 Order by: Product#

Product# Description Supplier Reorder Point

101102103

Regular gasEngine oilAntifreeze

ShellMobilDow

1,0005030

Detailed Inventory Status ReportDate: 12/16/03 Product Range:101–103

Product# Description Supplier Begin OH

102 Engine oil Mobil 100

Transaction# Date Quantity Sold 202 12/15/03 2 204 12/16/03 1Current Quantity On Hand 97

Transaction# Date Quantity Sold 201 12/15/03 13 202 12/15/03 14 203 12/15/03 10Current Quantity On Hand 9,963

(Etc.)

101 Regular gas Shell 10,000

62006_JonesRama_CH06.qxd 5/22/2002 10:29 AM Page 282

Page 23: QUERIES...accounting software, design effective reports, analyze reports in a given system, and suggest improvements. QUERIES Queries are an important element of relational databases

Database management system (DBMS). A collec-tion of programs that enables you to enter, orga-nize, and select information from a database. (241)

FROM. An SQL command that is used to iden-tify the table that provides the source of informa-tion desired. For example: FROM CustomerTable. (242)

Group event summary report. Reports that sum-marize event data by various parameters. Exam-ples include sales summarized by month or salessummarized by customer. (268)

Group footer. A section of a report that followsthe group detail. A group footer is often used topresent summary information about the group,such as subtotals and counts. (257)

Group header. A section of a report that precedesthe group detail section and is typically used to

show a group name or other information commonto the group of transactions that appear in thegroup detail section. (257)

Group summary report. Reports that summarizeevent data for a group of related records over adesignated period. Examples include total salesfor each customer or total quantities sold of each inventory item. Unlike grouped detail re-ports, group summary reports present only sum-mary information and do not list individualevents. (254)

Grouped detail report. A grouped detail status re-port or a grouped event detail report. (254)

Grouped detail status reports. Reports that dis-play summary and balance data about goods, ser-vices, or agents and usually some reference dataabout them as well. The report includes a listingof events that affected the summary data. An

283Understanding and Designing Queries and Reports Chapter 6

Figure 6.18Concluded

Summary Status Report (from Figure 6.15 on page 277)

Single Product/Service/Agent Status Report (Document) (from Figure 6.16 on page 279)

Summary Inventory Status ReportDate: 12/16/03 Product Range: 101–103

Product# Description Supplier Reorder Point Quantity On Hand

101102103

Regular gasEngine oilAntifreeze

ShellMobilDow

10,0005030

9,96397

9

Inventory StatusDate: 12/16/03

Product#: 101 Regular gasSupplier: Shell

Beginning Quantity 10,000 Sale# Date Quantity Sold 201 12/15/03 �13 202 12/15/03 �14 203 12/15/03 �10 �37Ending Quantity 9,963

KEY TERMS

62006_JonesRama_CH06.qxd 5/22/2002 10:29 AM Page 283