How can I configure a narrative report to sort all items at a level by date?

I am looking for the way to automatically sort all people at each level of a narrative report by date. For example, for an individual, marriages by date and for a family, children by birth date.

There are 5913 individuals and 2261 families in the database I imported into RootsMagic 8 from a GEDCOM file.

How do I do this?

Are you looking to change an existing narrative so that the persons are ordered differently? If so, that isn’t going to happen, without manual editing. All of the narrative reports have specific formats that they follow, and to which we users can not change. Saving the report to a word processor file would allow you to rearrange the content, but then it would need to be reindexed and such.

If I understand your question correctly, it really isn’t about reporting. That’s because the reports simply list spouses and children in the order that they have been entered into your database. Since you didn’t enter the data yourself but rather imported it from GEDCOM, you have no control over the order the individuals were entered.

You are not going to like the answer, but I promise it’s the only answer there is. You are going to have to go to each family and reorder the spouses and children as needed. It’s a very manual operation. Well, the possible exception would be to run an SQLite script. That depends on having sufficient computer skills to run such a script, and that option doesn’t apply to most RM users.

The RM8 tools to do such rearranging may be found in the side panel which defaults to being a left side panel. You highlight a person and click on spouses in the left side panel and then click on the Rearrange box. You will usually find Sort By Marriage Date to be the most useful option. Then, each spouse will have a Children line. Click on the Children line and again there is a Rearrange button, this time for the children. This time you will probably find Sort By Birth Date to be the most useful option.

After you get the spouses and children sorted in the database, they will print in the same order in reports.

@thejerrybryan mentions using SQLite. Here’s an example of one I developed long before RM8. It might still work.
https://sqlitetoolsforrootsmagic.com/children-set-order-by-birth-sortdate/

I wrote the program that generates the GEDCOM I imported to RootsMagic 8. My program extracts data from a spreadsheet. I modified the SQL query used to generate GEDCOM to order the children in a family by sequence and they now appear in sequence in RootsMagic 8. I did the same for family order when there is more than one family for a person but RootsMagic 8 then orders the families by FAM #. Gramps and Legacy Family Tree 9 do the same. I am now looking at reassigning FAM #s based on sequence for each individual and then exporting the GEDCOM.

GEDCOM documents are silent on sequence of families and of individuals in a family. There is some more clarity in the draft of GEDCOM 7.0 at GEDCOM Specifications - FamilySearch GEDCOM.

I edited the GEDCOM file to test my hypothesis that renumbering family numbers would cause RootsMagic 8 to show marriages in family number order. Even with the first marriage with a lower family number RootsMagic 8 shows the earlier marriage later than the later marriage. The marriages are ordered by the spouses’ surnames and by spouses’ individual numbers. From the edited GEDCOM file:

0 @F558@ FAM
1 MARR
2 DATE Oct 1661
2 PLAC Salem, , Massachusetts, United States
1 HUSB @I1551@
1 WIFE @I1553@
0 @F559@ FAM
1 MARR
2 DATE 12 Aug 1663
2 PLAC Reading, , Massachusetts, United States
2 NOTE or 1664, or Boston MA
1 HUSB @I1551@
1 WIFE @I1552@
1 CHIL @I1546@
1 NOTE @T3260@

F559 appears before F558 in the descendant chart and in the narrative report of descendants. Incidentally, the marriage documented in F559 is not reported in the narrative report.

Based on this I will not be modifying the GEDCOM-generating program to renumber families into sequence order. It is not clear what to change in the GEDCOM export to get the marriages to appear in sequence order.

hodgman

TomH

5m

I edited the GEDCOM file to test my hypothesis that renumbering family numbers would cause RootsMagic 8 to show marriages in family number order. Even with the first marriage with a lower family number RootsMagic 8 shows the earlier marriage later than the later marriage. The marriages are ordered by the spouses’ surnames and by spouses’ individual numbers. From the edited GEDCOM file:

0 @F558@ FAM
1 MARR
2 DATE Oct 1661
2 PLAC Salem, , Massachusetts, United States
1 HUSB @I1551@
1 WIFE @I1553@
0 @F559@ FAM
1 MARR
2 DATE 12 Aug 1663
2 PLAC Reading, , Massachusetts, United States
2 NOTE or 1664, or Boston MA
1 HUSB @I1551@
1 WIFE @I1552@
1 CHIL @I1546@
1 NOTE @T3260@

F559 appears before F558 in the descendant chart and in the narrative report of descendants. Incidentally, the marriage documented in F559 is not reported in the narrative report.

Based on this I will not be modifying the GEDCOM-generating program to renumber families into sequence order. It is not clear what to change in the GEDCOM export to get the marriages to appear in sequence order.

My experience is as follows.

If you wish to use SQLite to accomplish reordering, you will need to manipulate the ChildOrder data in the ChildTable to reorder children and you will need to manipulate the HusbOrder and WifeOrder data in the FamilyTable to reorder spouses. No amount of renumbering of the PersonID field or the FamilyID field will accomplish any reordering.

If you wish to edit a GEDCOM file to accomplish reordering, you will need to place the physical records in the GEDCOM in the correct order. For example, if Jane Doe and John Doe are sister and brother and if Jane was born before John, you will need to place the INDI record and all its subordinate records for Jane ahead of the INDI record and all its subordinate records for John. The same would be true for the FAM records for families.

The concept seems to be that if you are typing data into RM, children by default go in the order in which you type them in and spouses by default go in the order in which you type them in. Dates and person numbers and family numbers do not have anything to do with it. And the concept further seems to be that RM does the same thing when it imports GEDCOM. Namely, it puts children and spouses in the order in which it encounters them physically in the GEDOM.

I ran into the problem decades ago in reverse. I would export GEDCOM from Family Origins (predecessor to RM) and import the GEDCOM into rootsweb.com as a way to display my data on the Web. (rootsweb.com is not RootsMagic and has no connection whatsoever with RootsMagic). Even though I had used the same reordering tools in Family Origins to get children and spouses into the correct order that are still used in RM for the same purpose, rootsweb.com displayed children and spouses in the same order in which I had first typed them into RM which in turn was the same order that Family Origins had placed them into the GEDCOM.

I requested an enhancement to Family Origins to place children and spouses into physical order in GEDCOM in the same order to which I had reordered children and spouses in the Family Origins database. The response was that there was nothing in the GEDCOM standard requiring children and spouses to be placed in the correct order in the GEDCOM, and that it was the responsibility of the software reading the GEDCOM to place the children and spouses into the correct order by date.

I thought at the time that the answer was correct. I also thought at the time that the answer was ironic because Family Origins itself would not place imported GEDCOM into the correct order by date. Instead, it provided tools so that the user could accomplish the correct ordering manually on a family by family basis after the GEDCOM was imported.

I could be wrong, but I don’t think anything has changed from then until now, even all the way through RM8. Children and spouses being typed in or imported in via GEDCOM are ordered initially in the order in which RM encounters them. An obvious exception is that a direct import from RM7 into RM8 does preserve the RM7 ordering of children and spouses into RM8. I really don’t know what happens to the ordering of children and spouses on other direct imports, such as from TMG, FTM, Legacy, PAF, FamilySearch, or Ancestry/TreeShare.

I haven’t actually tested the ordering of children and spouses on GEDCOM import into RM in a very long time. I actually hope I’m wrong. I’m hoping the RM8 will import GEDCOM with children and spouses in date order, but I doubt it.

1 Like

I modified my program to export the GEDCOM so that it lists the families in each individual’s record in sequential order and list in children in each family record in sequential order. Imported to RootsMagic 8, the families and children are in the correct, sequential order.
My SQL queries had previously selected the data in FAM # and INDI # order rather than the sequence in which they were listed in the family group sheets. RootsMagic 8 dutifully listed those families and children in the order in which they were presented in the GEDCOM file.
GEDCOM spec through 5.1.1 states that order is not relevant for any entries or subentries that are at the same level. Nevertheless, RootsMagic 8 treats the order they are in in the GEDCOM file as the default sequence in which to present them. An option to sort sequenially by date would be useful. Sometimes, though, one might know the sequence but not corresponding dates.
Thank you for your help. You put me on to digging out the sequence data in my database and using it for my GEDCOM export.