hi,

Sub total it's good functionality, but when view render has only one page, subtotal has the same data as total.
The sub total could be hidden.

this code works :
(file theme.inc, function template_preprocess_views_calc_table, line 163)

if($view->total_rows > $view->pager['items_per_page']) {
  $process_available = array('sub_totals', 'totals');  
}else{
  $process_available = array('totals');
  $vars['sub_totals'] = array(); //if don't set, error in template
}

and replace line 165

foreach (array('sub_totals', 'totals') as $process) {

by

foreach ($process_available as $process) {

Comments

karens’s picture

Status: Active » Fixed

Good idea, committed. You didn't get a commit acknowledgment because I'm still learning how to do this on a Mac and I couldn't get the message working right, but thanks!

zedzed’s picture

You're welcome

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.