Error using report variables RRS feed

  • Question

  • Hi,

    I am using Min function in report variables. While previewing the report, I am getting the below error:

    "An error occured during local report processing. The variable(<variable name>) value expression for the report contains direct or indirect reference to itself. Loops in variable value expressions are not allowed.

    Does it mean that Min, Max functions cannot be used in report variables?

    Thursday, April 2, 2009 6:18 AM


All replies

  • You can only use aggregate functions on things that you can aggregate.

    A variable is a single entity, so I don't understand why you would want to do this.

    I think you might need to add a bit more information
    LaCie drives. Failing when you need them most."La" meaning "Terrible", "Cie" meaning "customer service"
    Thursday, April 2, 2009 7:04 AM
  • I want to take Min(Year) from a dataset and store it in a variable.

    As aggregate functions cannot be used in calculated fields, I tried with report variables.

    I have used the expression as: =Min(Year, "Dataset1")
    where Dataset1 is my dataset name.
    Thursday, April 2, 2009 7:09 AM
  • Hello,

    What is the expression you have written in the value value?

    You can use any of the aggregate function in the report variables, the error you got is pointing that the Value expression for the variable is pointing to the variable itself. Did you refer the variable in the value exprerssion, if it the correct then it should bot be done.

    Hope understood...

    Pavan http://www.ggktech.com
    Thursday, April 2, 2009 7:09 AM
  • I am not referring to the variable in the value expression.

    My variable value expression is: Max(Fields!Year.value, "Dataset1")

    I am using this variable in the chart to filter data for latest 3 years. So I am using the "Variable!MaxYear.Value" in the filter expressions. 

    I think, we can not use aggregate functions like First, last or previous in the report variables. So I got a doubt that we can not use any of the aggregate functions in report variables.


    Thursday, April 2, 2009 7:21 AM
  • Hello Arul,

    We cannot reference variables in Charts filter expressions, I suppose.

    For more information about variables and using them in charts refer link.

    hope helpful..

    Pavan http://www.ggktech.com
    Thursday, April 2, 2009 7:42 AM