Wednesday, March 28, 2012

Running Value

Hi all

I'm not sure if this is a BUG or if I'm missing something when using the Running value with Sum.

(WORKS FINE IF I DO NOT USE A SUBREPORT)

(=RunningValue(Fields!pervalue.Value,Sum,"chart1_SeriesGroup1")

I have a main report and a subreport, the key field (series group in the chart) that should reset the running value is passed by the main report, so is always different which should reset the running value sum to zero.

That is not working, the second time the subreport is invoked, seems like it takes the value from the previous last record and increase it by the same amount.

example

First call to subreport -

key field value = 1 (chart1_SeriesGroup1) subreport retrieve 4 records

rec 1 - pervalue 10

rec 2 - pervalue 5

rec 3 - pervalue 20

rec 4 - pervalue 15

everthing looks great

second call to subreport

key field value = 2 (this value is used in the running value reset series)

the subreport display

rec 1 - pervalue 15

rec 2 - pervalue 30

rec 3 - pervalue 45

instead of

rec 1 - pervalue 20

rec 2 - pervalue 50

rec 3 - pervalue 10

Thank in advance

I guess that the running value function, should not be used in a subreport, being that it does not work properly, seems like it saves the last value of the first group and add it to itself.

Thanks

No comments:

Post a Comment