Step by step: Count by gender
Learn how to get a count by gender in Amlib OpenReports.
Skills outlined in this Sample are revising those used last time
- Use of the Count Function within a Data Field for a simple count
- No Filter
- Right aligning figures
- Gaining Subtotals and Totals
A site may wish to get a break-down of counts of Males and Females and those Patrons where the Field is still empty. This could be shown as Counts in a Table or as a Graph
- Access the Report Designer TAB
- Select New from the buttons
- The Edit Report Window will display
- Enter a Report Title in the Report Title section. For the sample “Gender of Patrons”
- Enter a Group since we want to find it later easily – for example Borrower
- Enter a Sub Group – for example Count
- Choose Report Type from the Drop-down options (Table is default):
- Table – set out in rows and columns (select for the sample)
- Select Orientation
- Portrait (Landscape would work too
- Leave Sql as is
- Show details: For this sample Report enter
- None: As a straight Count is required
- Show Sub totals: Tick this to get the Subtotals
- Show total: Tick this to get the Grand Total
- Tick Private: leave this unticked but is your choice
- Show header on first page: For our sample tick this one if required
- Show header on next pages: This is your choice. But for now leave this unticked
Display Fields
- Select the Borrower Entity
- Select Borrower Barcode Data Field from the Entity as every borrower will have a Barcode so it will ensure a Count of every borrower. Drag and drop to Display – as this is an uncomplicated report we can set the Count directly for this Field
- Select the Borrower Barcode Data Field
- Change the Function to Count (this will ensure the number of Barcodes are counted rather than the sum of the Barcodes)
- Change the Align to Right (this will ensure the numbers align right so they sit correctly in the listing
- Change the Header if required. For example No of Borrowers so it makes sense of the Count when it is displayed
Group Fields
Drag and drop Borrower Gender to the Group fields to split the report into the Gender codes used by your Library
Filter
If ALL borrowers are to be counted, split by Gender, there is no need to set a Filter!
Order by
Sometimes it is useful to have an Order sequence if the way it orders the report by Default is not how it should display. For example,
- Drag and drop Borrower Gender to the Order by section
- Leave as Default (Ascending)
Preview
Select Preview to view the Report
Save
Once the Report is successful, select Save to be available in the Report Viewer