Reports
Reports are a mechanism for presenting information taken from a databaseA structured set of data held in a computer which makes it easy to search, select and store information Queries created using SQL or QBE will return the results in a table structure. Reports have the advantage of preparing the data in a format that can be printed and allow sorting and filterA filter can remove or hide unwanted items. A filter in a database can also reveal data under a certain criteria
From our example, Vicki could prepare the report of customers living outside Belfast to be printed landscape on A4 paper, grouped by town and sorted alphabetically by surname.
The SQL query would be:
1 SELECT TblCustomers.FirstName, TblCustomers.LastName, TblCustomers.[Town/City]
2 FROM TblCustomers
3 WHERE (((TblCustomers.[Town/City]):< >"Belfast"))
- The Select statement selects the fields needed in the query
- The From statement selects the table
- The Where statement applies the criteria to the query
The QBE query would be:
A reportExported data presented in a clear and readable form. can then be created based on this query. Database applications will allow users to group, sort and add headers and footers to the reports.
Complex reports also can include calculations. Database applications will provide functionality for basic mathematical functions (Sum, Avg, Max, Min, Count) within reports. In the example below, the sum function has been used to present monthly sales figures.
- Information is displayed simply and efficiently.
- Reports can be printed from the database to view information quickly and easily.
- If the user updates information in the database, the report can be recreated to contain the new information.
- Reports can contain subtotals, counts and other powerful formulas that save time and allow greater analysis.
- Graphical information including charts and graphs can collate, aggregate and summarise complex data sets.
- Complex reports will include two or more of the following: grouping; sorting; calculations.