Report system legacy

Geert Janssens janssens-geert at
Wed Jun 26 17:23:21 EDT 2013

On Wednesday 26 June 2013 14:10:13 Derek Atkins wrote:
> Christian Stimming <christian at> writes:
> > Hi Geert,
> > 
> > Am Dienstag, 25. Juni 2013, 20:09:26 schrieb Geert Janssens:
> >> Rewriting this to properly prevent duplicate names is probably
> >> possible, but I'd rather move in the other direction: allow
> >> duplicate names in custom reports.
> >> 
> >> My motivations:
> >> - I'm working on the uservoice request to allow to save a custom
> >> report without requiring to change the name first. ...
> > 
> > Very good!
> > 
> >> So I'd like to drop the restriction on duplicate report names. The
> >> consequence would be we can't guarantee anymore that reports stored
> >> in old meta files open correctly (that is with the proper options
> >> set). They may, but they may not. So I'd add a warning dialog in
> >> the code path that loads these old meta files, indicating that the
> >> report may or may not have been loaded properly.
> > 
> > Yes. Just drop the 2.2 compatibility restriction. This is really
> > long enough ago.
> I think there are two things..  I agree that we can (and should) drop
> the 2.2 compatibility restriction for 2.6.
> I also think it's fine to be able to save a report without changing
> its name, because that would be a "Custom" report versus an
> "Asset&Liability" (etc) report.  So I think that's fine, too.
> HOWEVER, I do think that we should only have a single saved report of
> the same name.  I.e., if we save a Balance Sheet report it goes into
> Custom/Balance Sheet which is fine.  But if you *resave* it, IMHO it
> should overwrite the previously saved Custom report of the same name.
That may not be the user's real intention. Instead the user may want to generate a second 
report  based on the same base report, but using different settings. So I think automatically 
overwriting the previously saved report may result in user frustration. At the very least we 
should ask the user what she wants to do.

> Even if we use GUIDs (which can be used to separate A&L/Balance Sheet
> from Custom/Balance Sheet) I don't think we should allow multiple
> Custom reports of the same name.
I can't make up my mind if we really should impose this restriction. My current changes make 
it trivial to rename a custom report at any time. That's already a big improvement compared to 
what we currently have. Granted, the name is the only visual distinction a user has in the 
custom reports dialog, so having a name twice is inconvenient. But as it's easy to rename a 
report, this inconvenience is mostly temporary. On the other hand adding checks at all possible 
code paths that may result in duplicate names for custom reports quickly adds complexity. 
There's the name changing code, the save report code, the code that loads the saved reports 
and perhaps other paths I haven't found yet.


More information about the gnucash-devel mailing list