|
 |
|
|
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 FuelCost field to the End-Reading query. Then we will add the FuelCost field from the End-Reading query to the Fuel Economy query.
 | When opening a query to edit it, it might appear as below. If you move your cursor over the black line (circled in red), it becomes a double headed arrow. Drag and drop it to a lower position.
|
Appearance of query when opened for editing.
- Add the FuelCost field to the End-Reading query:
- In the Fuel table list, double-click to add FuelCost to the bottom table.
- Save and close the query.
Adding an additional field to the query.
- Right-click the End-Reading query and select Edit from the context menu.
- Add the FuelCost 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 the table at the bottom.
- Add a calculation field to the right of the FuelCost field.
- Type the following in the Field cell:
"End-Reading".FuelCost/("End-Reading".Odometer - Fuel.Odometer)
- Type the following in the Alias cell:
cost per mile
 | If you use the metric system, cost per km is the appropriate alias.
|
- Save and close the query.
- Open a new report.
Right-click the Fuel Economy query and select Report Wizard.
- Select fields.
Move all the fields from the Available fields to the Fields in report list. Use the >> to do so. Click Next.
- Label fields.
Change FuelCost to Fuel Cost by placing a space between the words. Click Next.
- Group fields.
Use > to move the Date field to the Groupings list. Click Next.
- Sort options: the wizard skipped this one.
- Choose layout.
Accept the default. Click Next.
- 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.
Top of page
|
|
|