Wednesday, March 28, 2012

How to format a Matrix Subtotal

I have built my matrix and am trying to polish it for distribution, but am
having trouble with formatting when using subtotals. The matrix is
structured as follows.
Jan Feb Mar ...... Total
State Year1 10 8 15 ..... 117
Year2 9 11 18 ..... 124
What i need to do is place a vertical border seperating the monthly data
from the annual total. If I place the border on the right of the data column
in layout view, the border appears on all data columns. The subtotal, as
created by RS, only allows me to format the Header, not the value. In fact,
I have no access to the value.
The other formatting task i need to do is place a border after the state
group only, across the entire page. If I select the group, only the group
header is underlined. If i select the row, every data row is underlined.
The end result should be close to this.
Jan Feb Mar ...... Total
______________________________________
State Year1 | 10 8 15 ..... | 117
Year2 | 9 11 18 ..... | 124
______________________________________
Thanks in advance for your help,
GregThe BorderStyle>Right property can be set to an expression. Try something
like (depending on your data):
=iif(Fields!MyMonth.Value = "December", "Solid", "None")
this should put a border on the right only when the month cell value is
December.
For your second formatting requirement, suppose the outer group including
states is Country, you can use the BorderStyle>Bottom expression to put a
bottom border on the last state in the Country group. Here is one such
possible expression:
=iif(Fields!State.Value = Last(Fields!State.Value, "Country"), "Solid",
"None")
You can find out the name of the group containing the state group from the
properties of the matrix. Remember that the scope parameter is case sensitive.
In the expression above you are saying: If this state is the last one in its
country group, have a Solid border, otherwise no border. Put this expression
in the BorderStyle's Bottom property.
Charles Kangai, MCDBA, MCT
"GregRoberts" wrote:
> I have built my matrix and am trying to polish it for distribution, but am
> having trouble with formatting when using subtotals. The matrix is
> structured as follows.
> Jan Feb Mar ...... Total
> State Year1 10 8 15 ..... 117
> Year2 9 11 18 ..... 124
> What i need to do is place a vertical border seperating the monthly data
> from the annual total. If I place the border on the right of the data column
> in layout view, the border appears on all data columns. The subtotal, as
> created by RS, only allows me to format the Header, not the value. In fact,
> I have no access to the value.
> The other formatting task i need to do is place a border after the state
> group only, across the entire page. If I select the group, only the group
> header is underlined. If i select the row, every data row is underlined.
> The end result should be close to this.
> Jan Feb Mar ...... Total
> ______________________________________
> State Year1 | 10 8 15 ..... | 117
> Year2 | 9 11 18 ..... | 124
> ______________________________________
> Thanks in advance for your help,
> Greg
>|||Right click the green triangle in the upper right corner of the Total column
and choose properties.
"GregRoberts" wrote:
> I have built my matrix and am trying to polish it for distribution, but am
> having trouble with formatting when using subtotals. The matrix is
> structured as follows.
> Jan Feb Mar ...... Total
> State Year1 10 8 15 ..... 117
> Year2 9 11 18 ..... 124
> What i need to do is place a vertical border seperating the monthly data
> from the annual total. If I place the border on the right of the data column
> in layout view, the border appears on all data columns. The subtotal, as
> created by RS, only allows me to format the Header, not the value. In fact,
> I have no access to the value.
> The other formatting task i need to do is place a border after the state
> group only, across the entire page. If I select the group, only the group
> header is underlined. If i select the row, every data row is underlined.
> The end result should be close to this.
> Jan Feb Mar ...... Total
> ______________________________________
> State Year1 | 10 8 15 ..... | 117
> Year2 | 9 11 18 ..... | 124
> ______________________________________
> Thanks in advance for your help,
> Greg
>

No comments:

Post a Comment