Skip to Content
Former Member
Sep 14, 2010 at 08:43 PM

Array error!!


Hello all!! I am using CR 2008. I am working on a subreport that will get scores passed to it from a string variable in the main report. The string will look like this: ""

The scores come from a formula in the main report "Value RT". Here is the formula:

shared valuert as string
valuert = ToText({@FactorAvg1}) + "^" + ToText({@FactorAvg2}) + "^" + ToText({@FactorAvg3}) + "^" + ToText({@FactorAvg4}) + "^" + ToText({@FactorAvg5})
formula = valuert

I then created a subreport link against "Value RT" that created a parameter in my subreport named "Pm-@Value RT".

I then created a formula in my subreport named "Display Array" with this formula:

tonumber(split({?Pm-@Value RT}, "^")[recordnumber+1])

What I am wanting to do is create a graph against these numbers. I have created a record filter that brings back 5 records to match the number of scores. This will never change, there will always be 5 scores even if some of them are "0.0".

When I try to run the subreport all by itself and put in the 5 "scores" in the parameter i get an error in my "Display Array" formula of "A subscript must be between 1 and the size of the array." I have Googled this error but I can't find anything that will help me.

Does anybody have any ideas?