Groups | Blog | Home
all groups > sql server reporting services > july 2004 >

sql server reporting services : Me!Value in matrix subtotal


Thomas Williams
7/28/2004 10:50:02 PM
G'day all,

Trying to set a property, for instance foreground color, based on Me!Value expression in a matric subtotal with an expression like:
=IIf(Me.Value < 0, "Red", "Black")

produces the following error:
The color expression for the matrix ‘matrix1’ contains an error: [BC30456] 'Value' is not a member of 'ReportExprHostImpl.EH_matrix1.EH_MatrixDynamicGroup_...

jez_UK posted a similar question which is unanswered on July 14th, but my question is on Me!Value was different enough to warrant a new post.

Thanks in advance,

Robert Bruckner [MSFT]
7/29/2004 9:43:00 AM
I assume you clicked on the green triangle for the subtotal properties, and
modified the color expression for the subtotal. This won't work, because
every matrix cell is just a "container" for multiple reportitems (in your
case the matrix cell probably just contains one textbox). Only textboxes
would support Me.Value but not rectangles, etc. Therefore the compilation of
the expression results in an error.

You have to do this using an expression in textboxes of the matrix data
cells (assuming you have one column/row grouping called matrix1_ProdCat):
=iif(InScope("matrix1_ProdCat"), "Green", iif(Me.Value < 0, "Red", "Black"))

The expression above would do two things:
* regular matrix cell (which are in the scope of the matrix1_ProdCat
grouping) will have a green color
* subtotal matrix cells (which are not in the scope of the grouping) will
have red or black color based on the current textbox value.

--
This posting is provided "AS IS" with no warranties, and confers no rights.


[quoted text, click to view]
'Value' is not a member of
'ReportExprHostImpl.EH_matrix1.EH_MatrixDynamicGroup_...
[quoted text, click to view]

Thomas Williams
7/29/2004 8:25:03 PM
Hi Robert, thanks for the reply, now I've got to figure out the scope of my groupings (3 row groups, 1 column group) and create an "IIf" statement to cover them.

Thanks again mate!



[quoted text, click to view]
Getting started and liking it
8/4/2004 4:49:03 PM
I was redirected to this post from another. I am still having problems, though this post has clarified the Why and the What. I am at a loss for How.

What does "You have to do this using an expression in textboxes of the matrix data cells" mean? I take that to mean I need to make a textbox somewhere (I cannot use the provided subtotal matrix cell). Do you mean I have to delete the subtotal (and corresponding text box) and somehow manually add a textbox to the group and write an expression to get the value(the subtotal) and an expression to change the text color? Any help is greatly appreciated - I am spinning on this right now.

Thanks.

[quoted text, click to view]
Robert Bruckner [MSFT]
8/4/2004 5:39:26 PM
Don't delete the subtotal. However, instead of clicking on the green
triangle in the matrix heading, you click on the actual matrix data cell
which will show your data (most likely the matrix cell contains a textbox in
your case). The matrix cell probably contains an expression like
=Sum(Fields!Sales.Value)
For the conditional formatting of the cell content you will then use an
expression as outlined below:
=iif(InScope("matrix1_ProdCat"), "Green", iif(Me.Value < 0, "Red", "Black"))

If you have multiple row/column groupings in the matrix you will need to
take them into account when using the InScope function to determine if the
cell at runtime is a "subtotal cell" or a regular "data cell".
More information on InScope is available at:
http://msdn.microsoft.com/library/en-us/RSCREATE/htm/rcr_creating_expressions_v1_0jmt.asp

--
This posting is provided "AS IS" with no warranties, and confers no rights.


"Getting started and liking it" <Getting started and liking
[quoted text, click to view]
matrix data cells" mean? I take that to mean I need to make a textbox
somewhere (I cannot use the provided subtotal matrix cell). Do you mean I
have to delete the subtotal (and corresponding text box) and somehow
manually add a textbox to the group and write an expression to get the
value(the subtotal) and an expression to change the text color? Any help is
greatly appreciated - I am spinning on this right now.
[quoted text, click to view]

AddThis Social Bookmark Button