Admin Reports Search

From TNG_Wiki
Jump to: navigation, search

In TNGv12 and beyond, this mod uses the new guidelines for TNG v12+ cust_text.php files
If you are using TNGv12+, and any cust_text.php file in this mod is marked with a Bad Target error, you need to update your cust_text.php files before you can install this mod. [Show instructions]

If you upgraded to TNGv12+, and did not update your cust_text.php files as instructed in the upgrade readme script, then you must use the TNG Mod Manager to update them. To do so:

  1. Go to Mod Manager, and select its "Recommended Updates" tab.
    (If the "Recommended Updates" tab is not visible, then go to the Mod Manager Options tab, select "Display Settings", and turn on the "Recommended Updates" tab.)
  2. Click the "Update" button in the "Recommended Updates" tab.
    Installed mods do not interfere with the update, and if you already have (or think you may have) run this update, it will not hurt for you to run it again.

[See details in the TNGv12 Change Impacts Article][Hide the instructions]


Admin Reports Search (formerly Admin Reports List)
Summary Adds search features and results table columns to the Admin>>Reports>>Search page, and tweaks the Admin>>Reports>>Edit form so that it can both edit existing reports and add new reports.
Validation
Mod Updated 13 May 2018
Download link
v12.0.0.3a.zip
TNG 12.0
v11.0.0.3.zip
TNG 11.0
Download stats
Author(s) Robin Richmond
Homepage Robin Richmond's Genealogy Database
Mod Support My Mod Support form or TNG Community Forums
Contact Developer My Mod Support form
Latest Mod 12.0.0.3a
Min TNG V 12.0.0
Max TNG V 12.0.0 (at least)
Files modified
admin_reports.php, admin_editreport.php, admin_addreport.php, English cust_text.php
Related Mods
Notes


Purpose of the Mod

To improve the usability of the Admin>>Reports>>Search page.

  • Changes to the search form:
    1. The Add New tab invokes the (enhanced) Edit Report form instead of the (now defunct) New Report form.
    2. An Add New button goes one step further, and uses the Search string as the initial Report Name.
    3. A new 'Result per Page' field lets you specify a value that is different from the TNG System Variable
    4. Field Buttons have been added to the Search string and to the Results Per Page Field
  • Adds four columns to the results table to provide more information about each report:
    1. # of Display fields in the report definition,
    2. # of Criteria elements in the report definition,
    3. # of Sort fields in the report definition, and
    4. A 'Direct SQL' column that indicates whether the report contains a direct SQL statement, and that displays the entire SQL query when you hover over a 'Yes' in the 'Direct SQL' column

Compatibility with other Mods

No known incompatibilities. This mod is compatible with Reports Action Queries which is the only other published mod that claims to modify the Admin>>Reports>>Search page, and with Reports-Floating Editor, which is the only other published mod that claims to modify Admin>>Reports>>Edit.

Mod Dependencies

This mod saves data that can be used by the utility mod Show Mod Names, but is not dependent onShow Mod Names. There are no known dependencies on other mods.

Related Mods

I have written three other mods that affect reports:

  • Reports-Floating Editor makes better use of large computer screens when reports are being edited (at Admin>>Reports>>Edit). It allows the blocks of form fields that build the report to float side-by-side on the computer screen so that more of them can be seen at once. It also can unclutter the screen a bit by hiding either the report-building fields or the direct SQL field, since they can't really be used together. Reports-Floating Editor affects only the Report Editor, admin_editreport.php.
  • Reports Action Queries allows SQL Action Queries to be run in the TNG Reports system. It affects the Admin>>Reports>>Search page (admin_reports.php) and showreport.php.
  • Reports-Floating Results allows narrow reports to wrap into side-by-side report columns so that more data can be seen on the screen or printed page. It affects only showreport.php.


[Show Installation Details]

Requirements

  • A working TNG installation.
  • An installed current version of the Mod Manager.
  • You should backup files listed in the panel on the right.

Procedure

  1. Remove and delete previous version of this mod.
  2. Backup the files updated by this mod. They are listed in the panel at the upper right.
  3. Download the .zip file, Extract its .cfg file to the mods folder.
  4. Follow the normal automated installation for Mod Manager, as shown in the example Mod Manager - Installing Config Files.

Problems?

  1. Try using the Mod Manager Remove capability
  2. Contact me through My Mod Support form.
[Hide Details]

Visualizations

BEFORE The unmodified Admin>>Reports>Search screen

Admin reports search-before.jpg

AFTER Highlighting the new elements in the form and the results table
  • The new 'Add New' button is disabled, since there is no value in the 'Search For' field. (The 'Add New' button has no benefit over the 'Add New' tab unless there is a search string.
  • The new 'Results per page' field whose default value is the TNG system parameter (or the last value you specified for this field.
  • Four new columns in the results table.
  • The 'Search for' and 'Results per page' fields have attached "field buttons", most of which are shaded out. See the Field Buttons mod and a visualization below.
  • The red words "Update Query" in this screen shot are a glimpse of the Reports Action Queries mod.

Admin reports list-after.jpg

AFTER Showing pop-up SQL Code
  • The SQL code pops up when you hover over a cell in the Direct SQL? column.
  • It pops up right above the information about the record it applies to.
  • The width of the SQL code block varies with the page width, but at some widths, the SQL code block might be cut off on the left. When that happens, just drag the right edge of the browser window to make it a little bigger or smaller.

Admin reports search-after-sql.jpg

AFTER Field Buttons

If you have not installed the Field Buttons mod, the field buttons will not appear at all (even when they would otherwise be shaded out). The Field Buttons mod is completely optional.

  • The 'Search for' field can have an 'X' button and/or an 'R' button.
    • The 'X' button is visible when there is a search string. You can click it to clear the search string value.
    • The 'R' button is visible if the search string value has changed since the screen was loaded. You can click it to restore the initial value.
  • The 'Results per page' field can have 'R' 'D', and/or 'A' buttons.
    • The 'R' button works the same way as it does with the 'Search for' field.
    • The 'D' button is visible when the 'Results per page' value different from the TNG system parameter 'Max Search Results'. You can click it to set that default value.
    • The 'A' button is visible when the 'Results per page' value is not 'all' (which, as you would expect, that all of the search matches should be displayed on one page). You can click on it to set the value 'all'.

See the Field Buttons Wiki article for more information.
Admin reports search-after-fieldbuttons.jpg

Mod Change History

Mod Version TNG Version Date Note
11.0.0.3, 12.0.0.3 11.*, 12.0+ 13 May 2018 Restored the normal 'Add New' tab, removed the 'Add New' button from earlier versions, and brought a copy of the mod into compliance with TNGv12.
Admin Reports List 10.1.0.1 10.1-11.1 (at least; I believe that it should work for TNGv9 and TNGv10.0) 4 May 2017 Visible changes:
  1. Added 2 more display columns: The # of criteria elements, and the # of display fields,
  2. Added a pop-up to the Direct SQL column that shows the stored SQL query.

Plus these internal changes:

  1. Makes sure that all fields are initialized in the Add New Report form.
  2. Fixed a JavaScript comment that was formatted like a PHP comment, and was showing up on the screen.
  3. Added (optional) Show Mod Names functionality
  4. Changed admin_addreport.php, which creates a new report, so that it redirects to the report editor rather than to back to the search page.
9.2.2.1 download 9.2.2 - 10.1 (at least; I believe it works at least through TNGv11.1) 17 Jan 2015 Initial release.

Sites using this mod

If you download and install this mod, please add your site to the table below.

URL User Note Mod-Version TNG-Version User-language
Robin Richmond's Genealogy Database Robin Richmond Mod developer 12.0.0.3b 12.0 English
DJCM.DK Claus Martinussen 9.2.2.1 10.1.3 Danish, English
Wortelboer Genealogy Bernard Wortelboer 9.2.2.1 10.1.3 Dutch, English