From f73215fede0643804914f711a6e9f9125c4f1c81 Mon Sep 17 00:00:00 2001 From: dave Date: Fri, 16 Oct 2009 18:39:39 +0000 Subject: [PATCH] - Enable maxyear user filtering. unfortunately it needs to be specified manually (done this way because i don't want to start integrating changes with the report system right now.) --- admin/reports_fundraising.inc.php | 10 +++++++++- db/db.update.147.sql | 4 +++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/admin/reports_fundraising.inc.php b/admin/reports_fundraising.inc.php index bc70df2..82ce791 100644 --- a/admin/reports_fundraising.inc.php +++ b/admin/reports_fundraising.inc.php @@ -120,6 +120,14 @@ $report_fundraisings_fields = array( 'table' => 'users.year', 'components' => array('users') ), + 'user_filter' => array( + 'name' => 'User Filter by MAX(year)', + 'header' => '', + 'width' => 0.1, + 'table' => 'MAX(users.year)', + 'group_by' => array('users.uid'), + 'components' => array('users') ), + 'static_text' => array( 'name' => 'Static Text (useful for labels)', 'header' => '', @@ -162,7 +170,7 @@ $report_fundraisings_fields = array( } */ - $q = " FROM fundraising_campaigns + $q = " FROM fundraising_campaigns $users_from WHERE 1 diff --git a/db/db.update.147.sql b/db/db.update.147.sql index 004d310..0fcc187 100644 --- a/db/db.update.147.sql +++ b/db/db.update.147.sql @@ -15,5 +15,7 @@ INSERT INTO `reports_items` (`id`, `reports_id`, `type`, `ord`, `field`, `value` ('', LAST_INSERT_ID(), 'col', 0, 'namefl', '', 5, 5, 95, 12, 1, '', 'left vcenter'), ('', LAST_INSERT_ID(), 'col', 1, 'address', '', 5, 30, 95, 24, 2, '', 'left vcenter'), ('', LAST_INSERT_ID(), 'col', 2, 'city_prov', '', 5, 60, 95, 12, 1, '', 'left vcenter'), - ('', LAST_INSERT_ID(), 'col', 3, 'postal', '', 5, 80, 95, 12, 1, '', 'left vcenter'); + ('', LAST_INSERT_ID(), 'col', 3, 'postal', '', 5, 80, 95, 12, 1, '', 'left vcenter'), + ('', LAST_INSERT_ID(), 'col', 4, 'user_filter', '', 99, 99, 1, 1, 1, '', 'center vcenter'); +