Page 1 of 1

Saving Report Options and not overwriting them.

Posted: 01 Aug 2014 23:53
by jimlad68
If I make amendments to the Report Options (say narrative descendants by generation), on closing I am not asked if I want to save the new Options, I seem to have no choice. This means that if you make changes you don't like, you have to remember what you changed and undo them all.

This is fine if you are happy to go back to installation settings, but if you have created a custom report type, the original settings are lost.

I would have thought it normal to ask if changes want to be kept, saved to a new custom report or lost.

I'm hoping there is a setting somewhere for this, as the only other option I can think of is to save a new custom setting as a backup before I make any changes, then delete whichever is not needed later, or do some routine with C:\ProgramData\Calico Pie\Family Historian\Reports\Custom. Doable, but messy.

Re: Saving Report Options and not overwriting them.

Posted: 02 Aug 2014 00:00
by tatewise
I don't recall any option regarding keeping/discarding changed Report settings.

There are a couple of workarounds:

1) Use File > Import/Export > Export > Report Type before you start experimenting, and then it can be imported to restore your settings. You do this at any time during your experimentation to save various settings and give each one a different filename. However, this only works for Custom Report Types and NOT Standard Reports.

2) Use the Backup and Restore Family Historian Settings Plugin, although this is probably overkill, it is the only way of preserving Standard Reports, short of using non-FH backup/restore methods on the C:\ProgramData\Calico Pie\Family Historian\ folder.

Re: Saving Report Options and not overwriting them.

Posted: 02 Aug 2014 08:21
by DavidNewton
Monitoring the reports folders reveals that the options are saved to the report file as soon as you click the OK button on the options screen.

Therefore it is necessary to take action before making changes and within FH I thiink that means saving a copy of your custom report under another name before you make changes.

Another, more esoteric way, would be to store the current state of all custom reports in an external text editor before starting. The following line

fhShellExecute('Notepad++.exe',[[C:\ProgramData\Calico Pie\Family Historian\Reports\Custom]])

in a simple plugin will open all the custom reports in the text editor Notepad++. If you then make changes you want to revert you can save the appropriate file - again with a new name - from within Notepad++ which will restore your original custom report under it's new name. Be careful not to reload when Notepad++ says that the file has been altered by an external program.

David

Re: Saving Report Options and not overwriting them.

Posted: 02 Aug 2014 09:23
by jimlad68
Mike, David, thanks for those "possibilities", but like I said, all messy, but I now have a few options to play with. I'm surprised no one else has found this a problem, perhaps having found "mr right" there is not much need to change, it's just the initial testing that creates permutations.

I suspect I will keep a regular separate "master" backup of my custom items and recover if needed, either via one of the options you mention, or my backup/sync program. I might also add a 3 digit version number to the end. I'm trying to keep it simple and automatic and quick.

Re: Saving Report Options and not overwriting them.

Posted: 02 Aug 2014 09:42
by Jane
I have redirected the Reports, Fact Set etc folders to my Dropbox, so it keeps revisions for me at least for a while. If you want a really belt and braces you could always use Git, but I have never bothered with that except for Plugins.

Another option is if you are using Windows 8 you could turn on the File History functions for the relevant folders.

Re: Saving Report Options and not overwriting them.

Posted: 02 Aug 2014 09:48
by tatewise
The Report Options are also immediately written to file when the Apply button is used.

A complication is that it may not be the original settings you want to keep/restore, but some intermediate experimental settings.

As with any 'software development' this requires a modicum of discipline:
Start by creating a 'work in progress' Report Type cloned from an existing Report Type.
Keep working notes of what the option settings achieve and that give satisfactory results.
To save a successful combination of options use File > Import/Export > Export > Report Type.
To restore an earlier combination of options use File > Import/Export > Import > Report Type.
Repeat the above process until the final choice of options has been confirmed.
Delete all the 'work in progress' exported Report Type files.
Save the finished Custom Report Type under a memorable name.

The same discipline should be applied to developing any Diagram Type, Diagram Text Scheme, Fact Set, Query, Property Box Tab, Plugin, etc.
In particular, I rarely alter any such Standard items, and keep them at Installation Settings.
I have never understood why users may change Standard items (c.f. Standard Queries cannot be changed).
It would eliminate many FHUG Forum/[FHU] Mail questions if their options could not be changed.
The only necessary amendment would be an ability to assign a Diagram Type to each toolbar diagram icon.
Wouldn't it be neat to be able to assign any Report Type or Query to a toolbar icon for quick access, rather like the Windows Pin to Taskbar or Pin to Start Menu.