--- customreports.module
+++ (clipboard)
@@ -189,7 +189,7 @@
   if (is_array($header) && is_array($data)) {
     $function = 'customreports_render_'. $type;
     if (function_exists($function)) {
-      return call_user_func($function, $header, $data);
+      return call_user_func($function, $header, $data, $node);
     }
     else {
       drupal_set_message(t('Requested render type not available, falling back to table display.'), 'warning');
@@ -213,10 +213,11 @@
  * @param string $delimiter
  *   The field delimiter string.
  */
-function customreports_render_csv($header, $rows, $separator = ',', $delimiter = '"') {
-  $timestamp = date("d-m-y"); // Create a timestamp for the filename.
+function customreports_render_csv($header, $rows, $node, $separator = ',', $delimiter = '"') {
+  $timestamp = date("Y-m-d"); // Create a timestamp for the filename.
+  $filename = $node->title.' '.$timestamp.'.csv';
   header("Content-type: text/csv");
-  header('Content-Disposition: attachment; filename="customreports-' . $timestamp . '.csv"');
+  header('Content-Disposition: attachment; filename="'. $filename .'"');
 
   /**
    * Warning, we are replacing double quotes with single quotes so the delimiter will 
@@ -241,9 +242,9 @@
  * @param array $rows
  *   Array of items to be rendered as the XLS content.
  */
-function customreports_render_xls($header, $rows) {
-  $timestamp = date("d-m-y"); // Create a timestamp for the filename.
-  $filename = 'customreports-'. $timestamp .'.xls';
+function customreports_render_xls($header, $rows, $node) {
+  $timestamp = date("Y-m-d"); // Create a timestamp for the filename.
+  $filename = $node->title.' '.$timestamp.'.xls';
 
   header('Content-type: application/vnd.ms-excel');
   header('Content-Disposition: attachment; filename="'. $filename .'"');
