Monday, March 19, 2012

Me!Value in matrix subtotal

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,
Thomas WilliamsI 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.
"Thomas Williams" <thomasswilliams@.hotmail.com> wrote in message
news:AE48347D-440C-4E91-97EC-234F464F871B@.microsoft.com...
> 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,
> Thomas Williams|||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!
"Robert Bruckner [MSFT]" wrote:
> 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.
>
> "Thomas Williams" <thomasswilliams@.hotmail.com> wrote in message
> news:AE48347D-440C-4E91-97EC-234F464F871B@.microsoft.com...
> > 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,
> >
> > Thomas Williams
>
>|||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.
"Robert Bruckner [MSFT]" wrote:
> 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.
>
> "Thomas Williams" <thomasswilliams@.hotmail.com> wrote in message
> news:AE48347D-440C-4E91-97EC-234F464F871B@.microsoft.com...
> > 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,
> >
> > Thomas Williams
>
>|||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
it@.discussions.microsoft.com> wrote in message
news:6A6F92A4-59AA-4B90-8A5A-433E85B3A8B6@.microsoft.com...
> 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.
> "Robert Bruckner [MSFT]" wrote:
> > 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.
> >
> >
> > "Thomas Williams" <thomasswilliams@.hotmail.com> wrote in message
> > news:AE48347D-440C-4E91-97EC-234F464F871B@.microsoft.com...
> > > 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,
> > >
> > > Thomas Williams
> >
> >
> >

No comments:

Post a Comment