Stockitem entity
Learn about the Stockitem entity in Amlib OpenReports.
Average cost of item by stats code
Skills outlined in this Sample – Getting Averages, Setting format to $ 0.00
- Select New from the buttons of the Report Designer
- The Edit Report Window will display
- Enter a Report Title in the Report Title section. This can display at the top of the report. For the sample we can give a Title of Average cost of item by Stats Code
- Enter a Group if the Reports for example Stockitem
- Enter a Sub Group for example Average Cost for items
- Choose Report Type from the Drop-down options (Table is default):
- Table – set out in rows and columns (select for the sample)
- Select Orientation
- Landscape (select for the sample)
- Leave Show Sql
- Show details: For this sample Report we will leave as the Defaults
- None: Shows the numbers for the results but not the details within the Report. Fields will be hidden
- Show Sub totals if a calculation based on Groups is required (Default is unticked). For the sample tick this
- Show total if a Total calculation of the Sub totals is required (Default is unticked). For the sample tick this
- Private For our sample leave this unticked.
- Show header on first page. For our sample leave this ticked
- Show header on next pages. For our sample leave this unticked
Display Fields
- Highlight the Entity from the Entities / Data Fields Column
- For this sample, select the entity of Stockitem
- Drag and drop Item Cost into the Display Field Table
- Click on the Item Cost to set the Format to $ 0.00 (ensure a space is inserted after the $ symbol)
- Change the Function to Avg.
- Check that the Align is Right. Alter the Heading to Average Cost per Item to make more sense of the report and change the Width to cater for the longer Heading
Group
- Highlight the Stockitem Entity from the Entities/Data fields column
- Drag and drop Item Stats Code to the Group fields column which will base the Average on Item Stats Code
Filter
It is not necessary to select a Filter at all if you want to display the average of All Stats codes returned as a result
NOTE: A Filter can be defined if only certain Stats codes are required or an extra element is to be included – for example, only certain Locations, certain Form Codes, set a Date Received to get an Average of new resources, those that have a certain Process code like Missing in Stocktake etc.
Order by
It is not necessary to display an Order unless a specific Order is required
Preview
Select Preview to view the Report
Save
Once the Report is successful, save so it can be used again in the Viewer or Designer