Index: uc_reports.module
===================================================================
--- uc_reports.module	(revision 6)
+++ uc_reports.module	(working copy)
@@ -222,12 +222,11 @@
   $page = (!is_null($_GET['page'])) ? intval($_GET['page']) : 0;
   $page_size = (!is_null($_GET['nopage'])) ? UC_REPORTS_MAX_RECORDS : variable_get('uc_reports_table_size', 30);
   $order_statuses = _uc_reports_order_statuses();
-  $product_types = array("'product'");
-  $types = db_query("SELECT DISTINCT(pcid) FROM {uc_product_classes}");
-  $csv_rows = array();
-  while ($type = db_fetch_object($types)) {
-    $product_types[] = "'". $type->pcid ."'";
+  $p_types = module_invoke_all('product_types');
+  foreach ($p_types as $id) {
+    $product_types[] = "'". $id ."'";
   }
+  $csv_rows = array();
 
   if ($statistics && $count_views) {
     $header = array(

