I'm using DBR.calc to get a total, and a percentage of the total. It is working great on the web view and export to pdf.
However, when exporting to excel/csv, anytime dbr.calc would result in 0, it returns the rownumber instead of 0. Most of our users prefer the excel format for their reports... which creates some pretty major issues on our end.
Screenshot with differences highlighted
select 'dbr.hdr', '[type]';
select 'dbr.colstyle', '[a_pct]', '%.2f%%';
select 'dbr.colstyle', '[b_pct]', '%.2f%%';
select 'dbr.summary.text', '[type]', 'Total' ;
select 'dbr.calc', '[a_pct]','[a]/([a]+[b])*100';
select 'dbr.calc', '[b_pct]','[b]/([a]+[b])*100';
select 'dbr.calc', '[total]','[a]+[b]';
select 'dbr.sum', '[a]', '[b]' ;
select cat_type as "Type[type]", cat_category as "Category[category]", IFNULL(a_count, 0) as "A[a]", null as "A %[a_pct]", IFNULL(b_count, 0) as "B[b]", null as "B %[b_pct]", null as "Total[total]" from mydb.mydbr_calc_test;
I was able to fix the percents by simply changing it to use sql to explicitly declare the formula... but that doesn't fix the summary rows (and I prefer the dbr format vs sql).
Any advice/help would be greatly appreciated.