Show zeroes for predefined data column totals if null

(4 posts) (2 voices)
  1. cris, Member

    In this myDBR Crosstab doc picture from the mydbr documentation, the totals for the predefined data columns show zero for the total if there isn't any data in the above column. I re-created this table, and I don't see zeroes for the totals, just a null value. Only the columns with a value listed show numbers in the total row. I get the same results from my crosstab. Is there a way to display zeroes instead of a null for the total?

    Thank you,

    select 'dbr.crosstab', 'nameMonth'; select 'dbr.crosstab.col', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12; select 'dbr.sum', 'value'; select 'dbr.hsum', 'value';

    select 'ABC' as 'nameStuff', 4 as 'nameMonth', 10 as '[value]' union all select 'ABC', 5, 11 union all select 'BCD', 1, 12 union all select 'BCD', 5, 13 union all select 'BCD', 7, 14 union all select 'BCD', 11, 15 union all select 'CDE', 1, 16 union all select 'CDE', 3, 17 union all select 'EDF', 6, 18;

  2. myDBR Team, Key Master

    the logic has changed since (we'll update the documentation). Now the default is that sum of NULL's is NULL.

    You can set the default to be zero by setting in user/defaults.php:

    $mydbr_defaults['summary_row']['aggregate_null'] = 0;
    $mydbr_defaults['summary_row']['hide_prefix_when_empty'] = false;

    myDBR Team

  3. cris, Member

    I tested this two weeks ago, and it seemed to be working fine, showing zeroes for the sum of NULLs. I revisited this yesterday and today, and now the zeroes aren't showing up. Did something change? I have verified the settings in user/defaults.php.

  4. myDBR Team, Key Master

    just run the automatic updater to get the latest version.

    myDBR Team


You must log in to post.