Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Care Tech Bulletin c2011575

Status
Not open for further replies.

MIKE6969

Programmer
Joined
Jul 20, 2003
Messages
3
Location
US
I'm using CR Version 8.

I followed this bulletin and successfully executed the program to group items in the same order as the parameter values entered.

However, upon refreshing the data, I received the error message:
"A subscript must be between 1 and the size of the array"

The following basic syntax formula, extracted from the bulletdin was used:

dim i as number
do
i= i+1
loop until {JrnlRow.Journal} = {?SelectGroupValues}(i)
formula = i

Does anyone have any suggestions.
 
dim icount as number
do
icount = icount +1
loop until {JrnlRow.Journal} = {?SelectGroupValues}[icount ]
formula = icount

I think this is your problem....arrays require square brackets..I changed i to icount so you can find it...bracketing an i yelds an italic tag

I am not sure about this in Basic syntax but looks like a resonable source of error.




Jim Broadbent
 
opps...sorry didn't read carefully....probably you did not get a match the value of 'i' incremented beyond the size of the parameter array

I would modify such a formula to take this into account

dim i as number
i = 0 // if i = 0 you did not get a match
do
i= i+1
loop until {JrnlRow.Journal} = {?SelectGroupValues}(i) OR i = ubound(?SelectGroupValues)
formula = i

Jim Broadbent
 
Jim,

This works like a charm. I guess Crystal's knowledge base isn't perfect.

Thanks a million.

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top