Hello!
I have complex report, that has multiple tables in it. One of them uses dbr.calc and is something like this:
select 'dbr.calc', 'percent', '[Total]/[Total.sum]*100';
select 'dbr.calc', 'percent2', '[Bad]/[Bad.sum]*100';
select
DATE_FORMAT(a.paid_date
,'%Y-%m') "Month"
,count(*) Total
,100*b.percent as 'Bad %'
, null 'SG weight[percent]'
, null 'Bad weight[percent2]'
, round(count(*)*b.percent) as 'Bad'
from ...
;
if this tabel is placed as first table in report, everyhing works like a charm. But if I put it after table, that uses "dbr.crosstab" feature, the calculations fail and "percent" and "percent2" fields stay empty.