Changes

Jump to: navigation, search

Quick Views

265 bytes added, 04:26, 15 August 2015
Code: File:QuickViewReport-people-context-menu-popup-42.png
Quick Views (previously called ''Quick reports'' but show up in "Available Gramps Update for Addons" as ''Quickreport'') are reports that are available in the context menu's of person, family, ...
They are easy to make by users, even with limited coding knowledge.
[[Image:GrampsQuickViewReportEdit-40.png|thumb|right|400px|Quick View context menu on Person Editor]]
{{-}}
==Introduction==
Many users want to produce a report quickly for their specific needs, but are hindered by the fact they do not want to learn python fully, nor the intricacies of a complicated program like Gramps.
For them, starting in Gramps 3.0 a new tool has been constructed: the quick reportsQuick Views. These reports are short textual reports that the user can register with Gramps, so they automatically appear in the context menu's.  
Accompanying this, a [[Simple Access API|simple database access]] and simple document interface has been constructed, so as to hide as much complexity as possible.
 
{{-}}
==Where to store my quick report==
==Example 1==
===Code===
[[File:GrampsQuickViewReportQuickViewReport-40people-context-menu-popup-42.png|thumb|right|400px450px|Quick Report View context menu on Person View]][[File:Siblings quick report result.png|thumb|right|200px450px|Quick View Report example resultoutput]]
How better than to learn something than using an example?
===Analysis: accessing the data===
Now Now that your plugin runs, you need to open the database, start the document, access data, and write it out. We do this using the [[Simple Access API|Simple Database API]]. So,
<pre>
==Example 2==
A second example can be found in the Gramps code. See [httphttps://svngithub.code.sf.netcom/pgramps-project/gramps/codeblob/trunkmaster/gramps/plugins/quickview/all_events.py all_events.py]. In this report, all events for a person are printed, and all events for a family. Two quick reports are hence registered, one for person, and one for family.
==Notes==
The possibilities are enormous. If you are an experienced hackerprogrammer, there is no need to limit yourself to the simple database API. Also, if you make a real report, you can at the same time register a quick report with default settings. See: [https://github.com/gramps-project/gramps/tree/master/gramps/plugins/quickview https://github.com/gramps-project/gramps/tree/master/gramps/plugins/quickview]
[[Category:Developers/General]]

Navigation menu