Hi
I've created a crosstab report that mimmicks a short Profit and Loss Account e.g. I've created a Category Field and populated that with Sales, Costs, Gross Margin and % Gross Margin. The Crosstab enables me to have a number of previous months.
The crosstab works great but I have a problem in setting the number of decimal places. For each Category I've used:
select 'dbr.colstyle', 3, '%0.0f;-;[color:red](%0.0f)';
However for the % Gross Margin category in the crosstab I wish to have it displayed with 2 decimal places.
I've tried creating an extra column in the select statement and hiding it as follows:
select 'dbr.hidecolumns', 'class';
select 'dbr.css', '.perclass {[color:red]%.2f;} .greenclass {color:green;}';
select substring(Category,3) as '[Cat]', case MonNum when 0 then "Total" else date_format((STR_TO_DATE(MonNum, '%m')),'%b') end as Month , value as '', if (substring(Category,3)='% Gross Margin','perclass','greenclass') as 'class'
But this has no effect.
What's the best way to do what I'm trying to achieve?
Thanks
Jake