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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

split function not working 1

Status
Not open for further replies.

richardleehl

Technical User
Feb 13, 2008
7
0
0
US
Hi,

I created a main report that passes a variable to the subreport.

Main report:


shared stringvar strShowValue2;
strShowValue2:=strShowValue2+totext({@v_percentage})+"^";



I pass this to my subreport and it shows in subreport as:


{?Pm-@v2_ShowValue}= 0.00^0.00^95.04^0.00^



When I try to strip this passed variable per following:


tonumber(Split({?Pm-@v2_ShowValue},"^")[RecordNumber])


I get the message:

A subscript must be between 1 and the size of the array.


Any ideas why this is happening?


Any help would be greatly appreciated.
 
Sounds like you have more records than array values. This suggests that perhaps your array relates to group level values--although it is hard to tell without more information. You might want to try replacing recordnumber with groupnumber and see if that returns the expected values.

-LB
 
Thank you Thank you Thank you. You are a God. I spent four hours trying to fix this and your simple response was the answer I needed.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top