Question #1 is still open.
Part of #2 was answered by a syntax error that I missed. The argument for
the inScope function needed to be a string, so enclosing the object name in
quotes solved that. I still need to learn how to pass a NULL in the
expression (the second condition in the IIF). Using the syntax in my
original post, I am told to use System.DBNull, but that does not work. Does
anyone know how to pass a NULL in an expression? I have seen the question
raised here several times, but never an answer.
Thanks.
Randy Howie
-----------------
[quoted text, click to view] "Randy Howie" wrote:
> When previewing a report with a single matrix data region, I am getting the
> following warning message (3 times):
>
> The value expression for the textbox ‘textbox2’ references a field outside
> an aggregate function. Value expressions in matrix cells should be
> aggregates, to allow for subtotaling.
>
> Textbox 2 is the data value in the matrix (intersection value). The value
> for textbox2 is:
>
> =Sum(Fields!projectCost.Value)
>
> Since the value is clearly an aggregate, I am assuming that the warning
> message is referring to the parameters values I am using to navigate to a
> "jump to report". These values are standard field values that (I don't
> think) should be aggregates (e.g., =Fields!divisionName.Value,
> =Fields!teamName.Value, etc.). Since I am getting the warning 3 times and I
> am passing 3 parameters, I assume that it must be warning me about the
> parameter values rather than the textbox value.
>
> Two questions:
>
> 1) These are just warnings, and the report works fine. Is there a way to
> get a "clean" build, or do I just live with the warnings?
>
> 2) When I try to do an enhancement to pass a null value when the user links
> from the total column rather than body of the matrix, I get an error in
> addition to the 3 warnings. When I change the parameter value to:
>
> =iif(inScope(matrix1_divisionName),Fields!divisionName.Value, null)
>
> I get the following error:
>
> The value expression for the textbox ‘textbox2’ contains an error: [BC30451]
> Name 'matrix1_divisionName' is not declared.
>
> matrix1_divisionName is a valid group name within the grid.
>
> Any help would be appreciated.
>
> --
#1: You should use the First() aggregate function for the hyperlink actions
in order to get rid of the warning. E.g. =First(Fields!divisionName.Value)
#2: Use the VB keyword 'Nothing' which represents null. You can check values
for being null via e.g. =iif(Fields!x.Value is Nothing, ..., ...)
--
This posting is provided "AS IS" with no warranties, and confers no rights.
[quoted text, click to view] "Randy Howie" <RandyHowie@discussions.microsoft.com> wrote in message
news:EB306503-3A11-4DF5-AB1C-EB882831C8BC@microsoft.com...
> Question #1 is still open.
>
> Part of #2 was answered by a syntax error that I missed. The argument for
> the inScope function needed to be a string, so enclosing the object name
in
> quotes solved that. I still need to learn how to pass a NULL in the
> expression (the second condition in the IIF). Using the syntax in my
> original post, I am told to use System.DBNull, but that does not work.
Does
> anyone know how to pass a NULL in an expression? I have seen the question
> raised here several times, but never an answer.
>
> Thanks.
>
> Randy Howie
>
> -----------------
>
> "Randy Howie" wrote:
>
> > When previewing a report with a single matrix data region, I am getting
the
> > following warning message (3 times):
> >
> > The value expression for the textbox 'textbox2' references a field
outside
> > an aggregate function. Value expressions in matrix cells should be
> > aggregates, to allow for subtotaling.
> >
> > Textbox 2 is the data value in the matrix (intersection value). The
value
> > for textbox2 is:
> >
> > =Sum(Fields!projectCost.Value)
> >
> > Since the value is clearly an aggregate, I am assuming that the warning
> > message is referring to the parameters values I am using to navigate to
a
> > "jump to report". These values are standard field values that (I don't
> > think) should be aggregates (e.g., =Fields!divisionName.Value,
> > =Fields!teamName.Value, etc.). Since I am getting the warning 3 times
and I
> > am passing 3 parameters, I assume that it must be warning me about the
> > parameter values rather than the textbox value.
> >
> > Two questions:
> >
> > 1) These are just warnings, and the report works fine. Is there a way
to
> > get a "clean" build, or do I just live with the warnings?
> >
> > 2) When I try to do an enhancement to pass a null value when the user
links
> > from the total column rather than body of the matrix, I get an error in
> > addition to the 3 warnings. When I change the parameter value to:
> >
> > =iif(inScope(matrix1_divisionName),Fields!divisionName.Value, null)
> >
> > I get the following error:
> >
> > The value expression for the textbox 'textbox2' contains an error:
[BC30451]
> > Name 'matrix1_divisionName' is not declared.
> >
> > matrix1_divisionName is a valid group name within the grid.
> >
> > Any help would be appreciated.
> >
> > --
> > Randy Howie