SSC Project
SSC Project
CLASS:-
SECTION: -
REGISTRAION NO: -
CONTENTS
Introduction.....................................................................1
Planning a database.......................................................2
Creating reports..............................................................6
In this report file, a database file has been made upon the
“Automobile Expenses System”.
The first table to be created is Fuel. Its fields are Fuel ID, Date, Fuel Cost, Fuel
Quantity, Odometer, and Payment Type. Fuel Cost uses currency and two decimal
places.
Fuel Quantity and Odometer use the number format with 3 decimal places and 1
decimal place respectively.
Payment Type uses the text format.
The Payment field is a dropdown list. Enter the data just as you did in the main form,
and use the Tab key to go to the next field.
When you use the Tab key to leave the Payment field, it goes to the Date field of the
next line and automatically enters the date. Now you can enter
your second set of fuel data for this day.
To move to another record when the form has a sub form, click any of the fields of the
main form.
In this case, click the Date field of the main form. Then use the directional
arrows at the bottom. There are four of them from left to right: First Record, Previous
Record, Next Record, and Last Record. To the right of these arrows is the New
Record icon.
CREATING REPORTS:
Reports provide information found in the database in a useful way. In this they are
similar to queries. Reports are generated from the database’s tables or queries.
They can contain all of the fields of the table or query or just a selected group of fields.
Reports can be static or dynamic. Static reports contain the data in the selected fields
at the time the report was created. Dynamic reports can be updated to show the latest
data.
The report on vacation expenses divided into categories should probably be a static
report because it is based upon specific data that does not
change. However, a report on the fuel data should probably be a dynamic report,
because this report depends upon data that does change.
4) Click the field label you want to change and make your changes as you would in
any text box.
• Shorten Miscellaneous to Misc. Click Next.
5) Since we are grouping by the date, use the > button to move the Next.
6) Date field to the Grouping list. Click Next.
Sort options.We do not want to do any additional sorting. Click Next.
7) Choose layout.
We will be using the default settings for the layout. Click Next.
8) Create report.
• Label the report: Vacation Expenses.
• Select Static report.
• Click Finished.
1) Create a query containing only fuel bought on the days of the vacation.
a) Open a query in Design View.
b) Follow the steps for adding tables in Add tables. Add the Fuel table.
c) Double-click these fields in the Fuel table listing: Date and fuel Cost to enter
them in the table at the bottom of the query.
d) In the Criterion cell of the Date field, type the following:
BETWEEN #5/25/2007# AND #5/26/2007#
2) Save, name, and close the query. (Suggestion: Vacation Fuel Purchases.)
3) Open a new report.
• Right-click the Vacation Fuel Purchases query.
• Select Report Wizard from the context menu.
When a new report is opened in this way, the query used to open it is automatically
selected in the Tables or Queries dropdown list.
4) Create the report.
Use >> to move both fields from the Available Fields to the Fields in Report list. Click
Next.
5) Label fields.
Add a space to Fuel Cost to make it Fuel Cost (two words). Click Next.
6) Group fields.
Click Date to highlight it. Use > to move the Date field to the Groupings list. Click Next.
7) Choose layout. We will be making no changes in the layout. Click Next.
8) Create report (final settings).
• Use the suggested name, which is the same as the query.
• Select Static report.
• Click Finish.
CREATING A DYNAMIC REPORT
We will create a report with some statistics on our fuel consumption.
To do this, we have to modify two queries: End-Reading and Fuel Economy. We will
be adding the Fuel Cost field to the End-Reading query. Then we will add the Fuel
Cost field from the End-Reading query to the Fuel Economy query.
1) Add the Fuel Cost field to the End-Reading query:
• In the Fuel table list, double-click to add Fuel Cost to the bottom table.
• Save and close the query.
2) Right-click the End-Reading query and select Edit from the context menu.
3) Add the Fuel Cost field from the End-Reading query to the Fuel Economy query:
• Right-click the Fuel Economy query and select Edit from the
context menu.
• Double-click the FuelCost field in the End-Reading query list
to add it to the query table at the bottom.
4) Add a calculation field to the right of the FuelCost field.
• Type the following in an Field cell in the table at the
bottom:"End-Reading".FuelCost/("End-Reading".Odometer
– Fuel.Odometer)
• Type the following in its Alias cell: cost per mile.
5) Save and close the query.
6) Open a new report.
Right-click the Fuel Economy query and select Report Wizard.
7) Select fields.
Move all the fields from the Available fields to the Fields in report
list. Use the >> to do so. Click Next.
8) Label fields.
Change FuelCost to Fuel Cost by placing a space between the
words. Click Next.
9) Group fields.
Use > to move the Date field to the Groupings list. Click Next.
10) Sort options: the wizard skipped this one.
11) Choose layout.
Accept the default. Click Next.
12) Create the report.
• Change the report name to Fuel Statistics.
• The default setting is Dynamic report, so no change is necessary.
• Select Modify report layout.
• Click Finish.