What kind of chart?
Perhaps a pie chart?
And on what layout do you need to see the chart?
How do you log records in the maintenance table? One record for each time maitnenance is performed on a vehicle?
A pie chart for this can be set up on a layout based on the maitenance table and you can set it up for different periods of time by performing a find to pull up different found sets of records.
A pie chart is fine.
I want it in the dashboard layout.
Yes it's one record for each time a maintenance is performed on a vehicle.
The one based on reservations?
Such a chart cannot be placed on that layout. It will need to be placed on a layout based on the maintenance layout. A static copy could be copied from ther to the dashboard layout and placed in a container field. You'll first need to set it up on the maintenance layout, however.
Whether pie chart of bar chart (Bar chart may work better depending on how many vehicles are in your fleet), you can use a summary field to compute the total fo the amount field. You can then specify that the chart use "groups of data when sorted", the Vehicle ID would provide data for the X-Axis and you specify the summary field for the Y axis. YOu then perform a find for all records in a specified date range and sort your records by Vehicle ID to get 1 wedge or bar for each vehicle that has maitenance performed in that time period.
We have a total of 7 vehicles
The chart is showing the graph for EACH time a vehicle goes for maintenance instead of the total amount for each vehicle.
Sort your records by Vehicle ID so that they are grouped by Vehicle.
Now how can I make a static copy of it and place it in the dashboard layout?
Define a global container field.
Use the Name box on the inspector's Position tab to give your chart you just got to work an object name such as "MChart".
Then you can use this script to load the global container field with the current chart in the chart object:
Set Field [YourTable::YourContainerField ; GetLayoutObjectAttribute [ "MChart" ; "Content" ]