Index: webform_report.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webform_report/webform_report.module,v
retrieving revision 1.2.2.65
diff -u -r1.2.2.65 webform_report.module
--- webform_report.module	27 Feb 2010 21:01:48 -0000	1.2.2.65
+++ webform_report.module	5 Mar 2010 18:27:28 -0000
@@ -244,7 +244,7 @@
     if ($_POST['kcid'] == '') {
       form_set_error('kcid', t('You must select a field'));
     } else {
-      if($_POST['filter_type'] != 0 && $_POST['filter_value'] == '') {
+      if($_POST['filter_type'] != 0 && $_POST['filter_type'] != 5 && $_POST['filter_type'] != 6 && $_POST['filter_value'] == '') {
         form_set_error('filter_value', t('You must specify a filter value'));
       } else {
         if ($_POST['components'] == '') {
@@ -379,7 +379,7 @@
   unset($default, $options);
 
   if (isset($node->kcid) && $node->kcid != '0') {
-    $options = array(0 => t('none'), 1 => t('begins with'), 2 => t('does not begin with'), 3 => t('contains'), 4 => t('does not contain'));
+    $options = array(0 => t('none'), 1 => t('begins with'), 2 => t('does not begin with'), 3 => t('contains'), 4 => t('does not contain'), 5 => t('is empty'), 6 => t('is not empty'));
     $form['webform_report']['filter_type'] = array(
       '#type' => 'select',
       '#title' => t("Filter Type"),
@@ -397,7 +397,7 @@
       '#title' => t('Filter Value'),
       '#description' => t('Filter the key field using the specified value'),
       '#default_value' => $node->filter_value,
-      '#required' => TRUE,
+      '#required' => FALSE,
       '#weight' => 4
     );
   }
@@ -770,6 +770,16 @@
           $filtered_values[] = $value;
         }
         break;
+      case 5: // is empty
+        if(strlen(trim($value[$node->kcid]['data'])) == 0) {
+          $filtered_values[] = $value;
+        }
+        break;
+      case 6: // is not empty
+        if(strlen(trim($value[$node->kcid]['data'])) != 0) {
+          $filtered_values[] = $value;
+        }
+        break;
     }
   }
 

