Grid design in Facility and ePortal - Part 2 (formatting)
In Part 1, we looked at using formulas in the 'heading' field to bring back additional data. In this article, I'm going to explain some of the options for formatting the display of the data.
Let's return to the Design grid view where the settings for our grid are edited:
- From the main menu in Facility, select Attendance | Advanced | Grid design for Roll Call attendance
- Highlight ‘MyGrid'
- Click Configure
You should be looking at the Records tab.
We discussed how to edit the Heading field in Part 1. There are a number of other fields we can edit:
The Sort field
This specifies the order in which the selected students appear in the list on the left hand side of the Roll call window. If it is blank, the records will be sorted by the Name field on the student record (i.e. by surname then forename)
To sort the names by forename then surname instead, enter:
student.personal.forename+student.personal.surname
into the Sort field.
Something a little more practical might be to sort the names in ascending order of percentage attendance so the poor attenders appear at the top of the list:
int((Student.Attendstats.Possibleatt - Student.Attendstats.Numberabs)*100.0/Real(Student.Attendstats.Possibleatt))
This time we also need to tick the Numeric sort tick box, so that the resulting values are sorted numerically rather than alphabetically (which would treat 99 as greater than 100)
The Align, Displace and Grid line fields
You can tweak the display further by changing these fields:
- Align - Changes how the text in the left hand column is justified. The first box governs how the text is justified horizontally, the second vertically.
- Displace - Allows you to add space between the text in the left hand column and the edge of the cell. The first box specifies the horizontal displacement, the second vertical.
- Grid line - You can change the style, colour and thickness of the grid lines. Uniquely among the fields on the Records tab, the grid line settings apply within the grid itself as well, not just the left hand column.
The Font and Border buttons
It is possible to change the font style, size and colour by clicking on the Font button. The Display font settings govern how the text is displayed by default, and the Selected font how the text is displayed when the user selects a cell with the mouse. Remember that these settings are still only changing the left hand column, not the main grid area itself.
The Border button works in the same way, and controls the background colour of the cell as well as the border style, colour and thickness. Again, you can change the Display and Selected border settings.
An example
Let's bring all these options together make something suitably stylish and sophisticated...
- In the first Align field, set the horizontal alignment to Right
- In the first Displacement field, add a 10 pixel horizontal displacement
- In the Grid line colour field, change the grid colour to Maroon
- Click on the Font button, choose Display font and change the settings to Verdana, Bold Italic, 10 point, Maroon
- Click OK
- Click on the Font button, choose Selected font and change the settings to Verdana, Bold Italic, 10 point, Silver
- Click OK
- Click on the Border button, choose Display border, add a Silver border on all sides and change the background colour to Maroon
- Click OK
- Click on the Border button, choose Selected border, add a Maroon border on all sides and change the background colour to Silver
- Click OK
- Click OK to return to the Edit attendance views window
- Click Modify to save your changes
- From the main menu, select Attendance | Attendance by Roll call
- Choose a group of students and click Generate
Hopefully you should see something like this:
If you don't, check that you saved your changes to the grid correctly, and that 'MyGrid' is set as the chosen grid for the Roll call window (right-click somewhere around the edge of the Roll call window and click Choose style)