January 18, 2009 at 2:59 am
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.
January 19, 2009 at 10:47 am
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)
January 19, 2009 at 9:44 pm
Thank you So much. It worked!!!
January 20, 2009 at 2:18 am
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