Running Value resets for each page

  • Hi,

    We have a requirement to show cumulative sales across selected time hierarchy using Line Graph.

    For Ex: If I want to see sales for Year 2008 on Weekly basis. X-Axis shows all the 52 weeks and Y-Axis shows the Sales Amount.

    We are using RunningValue Funtion to get the cumulative Sales and implemented Page Break in order to show 12 weeks per page. Now, the problem is for each new page, Running Value resets to 0(Zero). We do not want to reset the running value across the complete data set.We tried to use RunningValue function in following ways but it didn't worked.

    RunningValue(Fieldname,Sum,DataSetName) or RunningValue(Fieldname,Sum,Nothing) encountered following error :

    "The DataPoint expression for the chart ‘XAxis’ has a scope parameter that is not valid for RunningValue, RowNumber or Previous. The scope parameter must be set to a string constant that is equal to the name of a containing group within the matrix ‘XAxis’"

    Please provide your suggestions.

  • You can implement your own "RunningValue" function via the report code (Report/Report Properties... Code tab.)

    Some thing like:

    Dim myRunningValue

    Function aRunningValue( currentValue )

    myRunningValue= myRunningValue+ currentValue

    Return myRunningValue

    End Function

    Of course, you'll have to decide for yourself how you want to reset "myRunningValue" (if necessary).

    for the field in the report, code =Code.aRunningValue(Fields!theField.Value)

  • Thank you So much. It worked!!!

  • Hi Viteran,

    I got stuck up at some other point 🙁

    One of the report "Product Based Sales", each product sales will be showed independently. Each line represents each selected product Sales. We have product dimention in Series Group. End user can select more than one product. When i select 3 products (Prod1, Prod2,Prod3) running total is not specific to product. I want to reset the value at each product.. following is the example:

    Source:

    Prod1 Quarter 1 Sales : 200

    Prod2 Quarter 1 Sales : 300

    Prod1 Quarter 2 Sales :100

    Prod 2 Quarter 2 Sales : 50

    Expected Output:

    Prod1 Quarter 1 Sales : 200

    Prod1 Quarter 2 Sales : 200 + 100 = 300

    Prod2 Quarter 1 Sales : 300

    Prod2 Quarter 2 Sales : 300 + 50 = 350

    Please provide your valuable suggestions in addition to the Custom Code you have provided in previous reply.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply