Hi,
I have a report that includes a matrix control. Within some of the
columns, I wish to apply different formatting to change negative
numbers to red. Currently I do this by applying a format of
#,##0.0
to the format property of the cells and
=iif(Fields!PerVarLY.Value < 0 ,"Red","Black")
to the font property
This displays fine in the report itself when rendered into html but when exported to excel, all numbers are coloured red whether positive or negative. It seems to take the font colour from 1 cell in the column and apply that to all the cells regardless of whether they meet the criteria or not. I have tried to remedy this by using INSCOPE to
determine if it is a level of detail issue (there are 2 groups in the report) but it seems not to be the case.
I have noticed that in the formats section of the cell properties, you can prescribe different formats for positive and negative numbers by using a ;
e.g.
#,##0;#,##0.0
will show no decimal places for positive numbers but 1 dp for negative
In MS Excel itself, you can use basic colours in here as well e.g.
#,##0; [red]-#,##0
But this doesn't seem to work in RS, the [Red] is simply accepted as a text string to prefix the number
Anyone got any ideas?
Rgds, Geoff
We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.
Please read FAQ222-2244 before you ask a question
I have a report that includes a matrix control. Within some of the
columns, I wish to apply different formatting to change negative
numbers to red. Currently I do this by applying a format of
#,##0.0
to the format property of the cells and
=iif(Fields!PerVarLY.Value < 0 ,"Red","Black")
to the font property
This displays fine in the report itself when rendered into html but when exported to excel, all numbers are coloured red whether positive or negative. It seems to take the font colour from 1 cell in the column and apply that to all the cells regardless of whether they meet the criteria or not. I have tried to remedy this by using INSCOPE to
determine if it is a level of detail issue (there are 2 groups in the report) but it seems not to be the case.
I have noticed that in the formats section of the cell properties, you can prescribe different formats for positive and negative numbers by using a ;
e.g.
#,##0;#,##0.0
will show no decimal places for positive numbers but 1 dp for negative
In MS Excel itself, you can use basic colours in here as well e.g.
#,##0; [red]-#,##0
But this doesn't seem to work in RS, the [Red] is simply accepted as a text string to prefix the number
Anyone got any ideas?
Rgds, Geoff
We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.
Please read FAQ222-2244 before you ask a question