Here is an update on how I have now incorporated custom report settings AND styles from Gramps 5x into 60. It appears that, with Gramps not running, it is safe—if you are careful—to:
(a) rename a copy of an existing xml of the form REPORT_TYPE.xml [from v5] to “REPORT_TYPE TREENAME.xml” [for v6], but this is only needed for reports where you have previously set up custom style sheets. IF you have only ever used the defaults for any report type [in the report_options.xml, near the end of the relevant module, there will be a line containing ‘style name=“default”’] there is no need to do anything for that type.
(b) if an xml of the “REPORT_TYPE TREENAME” form already exists [because you have tried that report type, only to realise that all your old settings had disappeared], paste the contents of the REPORT_TYPE.xml into it. In this case, full replacement of the contents of the file appears to be safe.
I wish there was more version date information in the commented section at the top of report py files, though most I have inspected so far do not appear to have changed between v5 and v6. In the event that there has been a change in the parameter structure and/or the default style name schema of a report type between Gramps versions, or even if the relevant addon is reworked, the method I have used on this occasion might fail.
AFTER editing or creating the REPORT_TYPE.xml file(s) for which you want to enable custom styles, edit the report_options.xml and, if the report type has already been run [i.e. if there is already a “module name” section of the form “REPORT_TYPE TREENAME” within the current report_options.xml] paste the contents of the v5 module section, between its module tags, into the new, which will overwrite the default settings with your old custom report settings. If the report type has not yet been run in v6 [and there is no “module” section for it in the report_options.xml] it appears to be safe to copy the v5 section [this time including the opening and closing tags], and paste it into the report_options.xml immediately AFTER the v5 section, renaming it to v6 form of “REPORT_TYPE TREENAME”. On the evidence of my report_options.xml, Gramps appears to expect the file to be in CASE-SENSITIVE alphabetical order by “module name”, i.e. all names with an initial or subsequent UPPERCASE character(s) listed before names with initial lowercase characters.
In my report_options.xml, after I had checked the report styles [and removed redundant types that I may have tested in the past but not used in years], the file has the “module name” entries in the following order [my comments in brackets; N means v5 not yet run in v6; ??? means this type appears to have disappeared or I have not yet figured out which current report name it relates to]—
Descendants Lines [5; custom style sheet]
Descendants Lines mytree_name [6; custom settings pasted in & custom style sheet created]
DynamicWeb [5; uses default styles]
DynamicWeb mytree_name [6; uses default styles; Report name=Dynamic Web Report]
ExpandedAncestorTree mytree_name [no v5 module; first installed after upgrade to 6; report name=Ancestor Tree Expanded]
FamilyTree [5; custom style sheet]
FamilyTree mytree_name [6; custom settings pasted in & custom style sheet created; report name=Family Tree]
PedigreeChart ???
PersonEverythingReport [N; uses default styles]
ancestor_chart [5; custom style sheet]
ancestor_chart mytree_name [6; custom settings pasted in & custom style sheet created; report name=Ancestor Tree]
ancestor_report [N; uses default styles]
birthday_report [N; uses default styles]
descend_chart [5; custom style sheet]
descend_chart mytree_name [6; custom settings pasted in & custom style sheet created; report name Descendant Tree]
descend_report [N; uses default styles]
det_ancestor_report [N; uses default styles]
det_descendant_report [N; uses default styles]
family_descend_chart [5; custom style sheet]
family_descend_chart mytree_name [6; custom settings pasted in & custom style sheet created; report name=Family Descendant Tree]
fanchart [N; uses default styles]
indiv_complete [N; uses default styles]
kinship_report [N; uses default styles]
navwebpage [N; uses default styles]
navwebpage tree_name [N; uses default styles]
number_of_ancestors [N; uses default styles]
personal_descend_tree ???
place_report [N; uses default styles]
statistics_chart [N; uses default styles]
I have now run all of the report types that I normally rely on for production, and they all now appear to work as intended.
It is helpful to keep in mind that custom settings [including, for example, configuration of substitution keys, and replacement list and note, as well as a reference to custom style sheet if any] are stored in the report_options.xml, whereas the current settings for the various text and drawing styles of a custom style sheet get stored in an .xml with a name corresponding with the report ID_name [which may be quite different from the Report Name]. It also helps to keep a written table of the report types for which you have relied on custom stylesheets, the stylesheet name(s), and within them which of the entities you have set to different colours, point size, line weight, spacing, etc, and which settings you have toggled on or off, relative to the default.]
Note that the default styles for any report type are not defined in xml style sheets—the default style sheet definitions are within the relevant py file for the report type. A user cannot edit the attributes of an entity in the default style sheet via the style editor. If, for instance, you want to make “Normal” or “Note” or “Title” text some colour other than the default of black, you can only do so after creating a separately named style sheet, which gets referenced by name in the report_options.xml and its definitions stored in a report_type.xml [e.g. ancestor_chart.xml]. You cannot even see what the settings are for different entities within the default style without creating [though not necessarily saving] a custom sheet of different name [which starts by inheritance from the default]. Only then can you see, for example, that the default [in, say, the ancestor chart] for drawing a box has an ugly shadow on it, which can then be turned OFF in a custom style, but not in the “default”!
As far as I can see there is no place [in the plugin manager or addons manager], where it is made clear which “Reports” submenu a particular named report will appear in [and, conversely, what module name should appear in the report_options.xml for any given report type listed in the “Reports” submenus], made all the more frustrating because there is inconsistent naming of report types, and inconsistent and often quite different naming of their underlying py filenames—not only as to character case or whether words are separated by spaces or underlines or nospace, and quite often with significant words within the report NAME, ID_name and/or filename in a different sequence. The variable terminology “… Report”, “… Tree” or “… Chart” within the “Graphical Report” and “Web Pages” submenus also adds to the confusion. It would, for instance, be helpful if both the name and the ID_name of all reports of the type “Web Page” contained the word “web” within them for clarity. Similarly for graphical reports, it might help if it were possible to consistently use some descriptor that clearly identifies those as Graphical reports.
While I am not a programmer or dev [though extremely thankful to those who are], I don’t understand why upgrade from one version to another does not already include bringing previously defined custom style sheets in from the prior version, and for prior versions of the custom settings for any report type to be populated into the [new] “REPORT_TYPE TREENAME” module entry which is generated when that type is first run in the new version. It is not a major issue for me, but some people who frequently change trees will be frustrated by the difficulties the current situation poses for adopting consistent “user-standardised” custom styles across reports of the same type generated from different trees.
This is why, as far as possible, I use LibreOffice [for odt output] and Inkscape [for svg] to do most of the work of final formatting of reports for ultimate distribution in pdf to family members. But in order to distinguish different elements of the report for fast subsequent selective reformatting, I still need various custom styles within Gramps so I can quickly apply different treatment to different chart elements in postprocessing. Text reports are not a problem, since there is already an extremely useful paragraph style built into every paragraph of Gramps odt output, and as long as you create a custom LibreOffice template for each report type, to be applied after generation, you can literally reformat every element in a text report in a matter of seconds. Then all you need to do before export to pdf is to check the pagination.
I am not convinced that it is a great idea that the custom style sheets for different Gramps versions are stored in the user settings root gramps folder—instead of within the gramps5x or gramps6x folder within it [which is where, for instance, a custom_filter.xml goes]. Unravelling what has gone on with your style sheets after an upgrade is made all the more difficult because as soon as you attempt to generate a report of any type in the new version, it overwrites the style sheet and report_options.xml from the prior version in that root folder. A full backup of your settings for Gramps at any point in time currently requires an offline copy of both the root-level files and the relevant grampsXX folder. As you can probably tell, I only learned this subtle little detail after I had upgraded, and my settings backup script has needed to be reworked as a result!
It would help if others who have restored their previous settings, or try the method outlined here, could update us about their experience..