Thanks for the speedy reply.
Jake
select 'dbr.calc','[perqty]','(([tqty]-[lqty])/[lqty])*100';
select 'dbr.calc','[perval]','(([tval]-[lval])/[lval])*100';
select 'dbr.hdr','qtr';
select 'dbr.hdr','cust';
select 'dbr.sum','tqty','lqty','lval','tval';
select 'dbr.css','.summary.cell.align_l.summary_level.summary_level2 {visibility:hidden;}';
select 'dbr.css','tr.summary_row.rowhdr_change > td {font-weight:bold;background-color:#f2f2f2;}';
select 'dbr.css','tr.summary_row.row > td {font-weight:bold;}';
select 'dbr.css','tr.summary_row.row.sortbottomhdr_change > td {background-color:#e6e6e6;font-weight:bold;}';
select 'dbr.colstyle','tval','lval','%0.0f';
select 'dbr.colstyle','perqty','perval','%0.1N %;-;[color:red;](%0.1N) %;';
select 'dbr.colstyle','qtr','[text-align:center;color:blue;font-weight:bold;]';
select 'dbr.summary.text','prod','Totals ';
select qtr as "Quarter[qtr]",
cust as "Customer[cust]",
prod as "Product[prod]",
tyqty as "This Year Qty[tqty]",
lyqty as "Last Year Qty[lqty]",
null as "Variance %[perqty]",
tyval as "This Year Value[tval]",
lyval as "Last Year Value[lval]",
null as "Variance %[perval]"
from sales_tmp
order by 1,2,3;