report builder records - ajtruckle/meeting-schedule-assistant-support GitHub Wiki
A Records block chooses which information the report uses, then repeats the blocks inside it once for every record. Think of it as "for each week in this period, do this". The Records editor has these parts.
Choose where the information comes from:
- Midweek meetings: one record for each week (the whole meeting: chairman, talks, students, prayers and so on).
- Weekend meetings: one record for each week with a weekend meeting (chairman, speaker, talk, Watchtower Study and so on).
- Away talks: one record for each talk given away (speaker from the congregation, time, congregation visited).
- Public talks: one record for each talk in the public talks list, with how often it has been heard.
- Congregations: one record for each congregation.
- Speakers: one record for each visiting speaker.
- Speaker talks: one record for each talk a speaker can give.
- Meeting attendance: one record for each meeting attendance entry of your own congregation.
- Attendance by month: one record for each month, with the average attendance.
- Publishers: one record for each publisher.
- Field service groups: one record for each field service group.
- Field ministry meetings: one record for each field ministry meeting arrangement.
- Special events: one record for each special event.
- Reminders: one record for each reminder.
- Backup log: one record for each backup MSA has made.
The fields you can use are listed in Sources and Fields.
If you change the source of a block that already uses fields the new source does not have (columns, fields, filters, sort orders), you are told which will be removed and can say Yes or No.
Which weeks to include. Choose one:
| Choice | Meaning |
|---|---|
| All dates | Every week MSA has |
| Last N months | The N months up to this week |
| Next N months | N months starting this week |
| From ... to ... | Two fixed dates you pick |
| Period | This / last / next service year (1 September to 31 August) or this / last / next calendar year |
| From year ... for N years | N calendar years starting with the year you enter |
| Parameters | A From and a To date taken from the report's Date parameters; a blank one leaves that end open |
"Last", "next" and "Period" are worked out from today's date every time the report runs, so a saved report never goes out of date. A start date is moved back to the Monday of its week.
The date range only applies to sources whose records belong to a week: Midweek meetings, Weekend meetings, Away talks, Meeting attendance, Special events, Reminders and Backup log. The other sources (Public talks, Congregations, Speakers, Speaker talks, Attendance by month, Publishers, Field service groups and Field ministry meetings) always list every record and ignore the date range.
With Parameters, the person running the report chooses the dates (see Parameters and placeholders). If both are blank, every week is used. Weeks before the From date or after the To date are left out. A Records block inside another one that is linked to it follows the outer block's range.
A list of fields and a direction (ascending or descending). The first row is the main sort; later rows break ties. Use Add, Remove, Move Up and Move Down to build the list. With no sort rows, records come in the order MSA reads them (normally by date).
Number fields (such as Talk number) sort by their value, so talk 20 comes before talk 100. Date and Time fields sort by date and time. Text fields sort alphabetically, ignoring capital letters. Empty values come first when ascending.
Filters keep only the records you want. The Filter tab is a list of conditions. Each condition has a Field, a Test and a Value.
Add conditions with Add; every row after the first starts with and or or:
- and: both conditions must be true,
- or: either may be true.
and is stronger than or. Read the list like a sentence, where each or starts a new set of "and" conditions. For example:
Chairman contains Smith
or Opening prayer contains Smith
shows weeks where Smith is chairman or gives the opening prayer. And
Week >= (a start date)
and Chairman = (empty)
shows weeks from that date that have no chairman.
The tests offered depend on the kind of field:
| Field kind | Tests |
|---|---|
| Text (names, themes...) | equals, does not equal, contains, does not contain, starts with, ends with |
| Number (talk number) | = != < <= > >= |
| Date (Week, Meeting date) | the same symbols, with a date picker for the value |
| Time (Meeting time) | the same symbols, with a time picker |
| Yes / No (Confirmed, Symposium, Local, Serving, Can chairman...) | equals Yes or No |
Matching of text is not case sensitive. A name field can hold several names ("Smith, John, Jones, Peter" for a part with two helpers), so contains is usually the test you want when looking for a person.
To find records where a field is empty, use equals (or =) and leave the value empty. To find records where it has a value, use does not equal (or !=) and leave the value empty. For dates and times, untick the picker's box to leave it empty.
A filter's value can be a parameter, so the person running the report chooses the name. A filter's value can be a parameter, so the person running the report chooses the name. Click the { } button next to the value and pick one: it shows as {name}. Choose it again to go back to typing a value. If the parameter is empty (for example a Choice left blank), the filter is skipped, so every record passes. See Parameters and placeholders.
A Records block can be put inside another Records block. For every outer record the inner block shows only the records that match it. The commonest use is Weekend meetings (outer) with Away talks (inner): each week shows its own away talks. Other useful pairs:
The editor of an inner Records block has a Link group:
- Outer record field: a field of the outer source (for example Week),
- This record field: a field of this block's source (for example Week).
| Outer source | Inner source | Link (outer = inner) |
|---|---|---|
| Congregations | Speakers | Name = Congregation |
| Speakers | Speaker talks | Speaker key = Speaker key |
| Public talks | Speaker talks | Talk number = Talk number |
| Field service groups | Publishers | Name = Group |
Records are shown where the two values are equal. The suggested link is Week = Week. Choose (Not linked) to show all of the inner block's records under every outer record.
Good to know:
- With a link set, the inner block's own Date range is greyed out: it follows the outer block. Its Sort and Filter still apply.
- If the outer record has no matching inner records, the inner block shows its "no rows" message, for that week only.
- Fields inside the inner block read the inner source. Fields of the outer record cannot be used inside the inner block.
Anything that shows data: Table, Field, Paragraph, Columns, Group, and also Heading, Text, Separator and If / Else (repeated for every record, which is handy for a line between records). Placeholders such as {row} can be used inside a Records block (see Parameters and placeholders).
If there are no records, the block shows a "No rows" message instead.
The Records block has an Appearance tab. Settings here (font, colours and so on) apply to everything inside the block unless a block inside changes them. See Appearance.
- Parent topic: Report Builder
- Previous topic: Parameters
- Next topic: Sources and Fields