This is repository contains a series of custom reports for GnuCash 5.x.
Filename: transaction-extended.scm
Description: Based on the built-in transaction report, it provides these additional features:
- a Sort by Substring option which includes a regular expression match similar to the one offered for the transaction filter. That feature is the generic version of the Transaction Report with Tags.
- a new option on the display tab called "Use More Permissive Match for Other Account Name and Code". This option enables a more permissive match for the other account name and code in order to reduce the number of "split transaction" account names with multisplits.
Filename: transaction-tags.scm
Description: An earlier version of transaction-extended.scm that focusses on Sort by tags specifically. It was releases as a proof-of-concept to provide some basic features related to the long-discussed request of being able to use orthogonal categories, classes, tags or "analytical dimensions" to retrieve and group transactions across several general ledger accounts. See https://bugs.gnucash.org/show_bug.cgi?id=113772
Limitations: This custom report is not a feature-rich solution. It only provides one type of report (similar to the existing transaction report) and does not provide any feature to "bulk manage" existing or future user-defined tags. So there is no feature to bulk rename, bulk move or bulk delete tags for instance. All changes to the data file (adding and changing tags) are done manually by the user. This feature only provides a custom report that uses tags as created by the user.
Custom reports can be easily installed and uninstalled and do not modify the core GnuCash files nor the data file.
Specific instructions below are based on more generic instructions on how to load custom reports available on the wiki: https://wiki.gnucash.org/wiki/Custom_Reports#Loading_Your_Report
Download the zip with the files from the Github Code button. Then unzip the files in a temporary directory.
- Start GnuCash 5.0
- Go to menu Help - About
- In the About GnuCash dialog, locate the entry for GNC_USERDATA_DIR. It's the first entry in the list. Keep note of this directory. You can even click on the link to open it.
- Copy the [report-filename].scm files of your choosing extracted from the zip file into that directory.
Custom reports need to be initialized in a config file called config-user.scm
Go back to the About GnuCash dialog from Step 2.
This time locate the second entry GNC_USERCONFIG_DIR. Click on the link to open the directory.
If there is already an existing file called config-user.scm in the directory from Step 3 then you need to edit that file and add whichever of these lines match the report(s) you want to enable:
(load (gnc-build-userdata-path "transaction-extended.scm"))
(load (gnc-build-userdata-path "transaction-tags.scm"))
If there isn't a file called config-user.scm in that directory, then you can either create one and put the above line in it or you can simply use the file that came with the zip file.
After restarting GnuCash, the custom "Transaction Report with Tags" should be available under the Reports - Experimental menu.
(TO DO)
A new tags sort key is made available in the primary and secondary key drop-down list, in the sorting options.
To see the transactions grouped by tags, one should select that key as well as enable the subtotal for the level selected.
More options are made available at the bottom of the sorting options.
- By default, the sort engine will look for tags starting with #. However to accomodate the ability to tag multiple dimensions (meaning several tags per transaction), the user is able to change that prefix to any character (even the # could be changed). For instance you could use tags for a project dimension, for instance #P-XXX where XXX is your project reference, so #P-001 #P-002 etc. You could also use tags for different departments so #D for instance, #D-MKTING #D-FINANCE, etc. Then to run a report on the project dimension, set the tag to #P, for the department dimension set the tag to #D.
- A checkbox allows to select the option to remove the prefix from the subtotal heading, so #D-FINANCE would simply show as FINANCE as the heading for instance (assuming #D- is entered as prefix)
- The tag search is first applied to the split memo, then if no match the transaction notes, then if no match the transaction description. Only the first matched tag (as per the prefix) is considered.
This is the heading that will be used for the subtotal group listing transactions with no match. A checkbox allows to automatically add the prefix to it or not.
Here is an example of a report sorted with the defaults on first level. Second level is sorted by account. I am using 2 tags in this sample file: #P-Anna and #P-Bob. Untagged transactions are listed at the bottom in the No Match # section.
Here is an example where I change the headings with these options.
Now my headings are a cleaner Anna, Bob and Nobody.
It is possible to remove the transactions with no matching tags by using the existing transaction filter (filter tab). Simply put the same tag prefix (# or whatever else you are using) in the Transaction Filter field.
Here only Anna and Bob are listed. No-match "Nobody" is no longer there.
Now I only want to see unmatched transactions.
These are just transactions that are not assigned to anybody
I could show Anna and Nobody, excluding Bob from the view (his transactions are excluded, not in nobody)
Many more variations are possible, thanks to the wonderfull filter feature.