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

Data extract using arrays - confused!

Status
Not open for further replies.

mart10

MIS
Nov 2, 2007
394
GB
I am using CR10

The following is a thread from couple of days ago as its not quite working when I setup formula for 'missing' data and I am desperate for a solution

So in example below I need to allow for 25 names in Group A, 15 Group B, 15 Group C and 5 Group D for instance,

Group A:paul Pindar,Gordon Hurst,Clare Waters,Simon Mayall,,,,,,,,,,,,,,,,,,,,,;
Group B:John Eary,Kristian Jewitt,Costas Demetriou,,,,,,,,,,,,;
Group C:,,,,,,,,,,,,,,;
Group D:,,,,;

I set up many individual formula as suggested eg GroupAName5

StringVar Array MandateText;
StringVar result;
MandateText:=Split({@GroupA},",");
result:=MandateText [5]


@GroupA is extractstring({T329.F329C},"Group A:",";") and I have also setup @GroupB C and D

For GroupAName 1 to 4 it works great as there are names in the string but for the next one I get following msg:' A subscript must be between 1 and the size of the array'

Bit baffled, if I put in an x in the number 5 position it still doesnt work, I have no idea what is going on and never used arrays before
 
I do not use arrays or extractstring very much, but I think I know what is going on. The extractstring is only returning an 'array' value when there is data. Thus in the 5th position on GroupA, there is no data (null string), thus nothing to return.

Unfortunately, I cannot think of a solution at the moment. I am sure some other experts will come up with a solution.
 
mmmmmm the odd thing seems to be if I put in say an x in position 5 it still didnt work, weird! What i thought was to put in an x instead of a null to return an x but then conditionally supress if x at the detail level - each GroupAName formula sits in its own detail level so thst the report will auto expand depending upon conditional supression

I'm realy stuck!
 
Original Thread (posted yesterday) Located Here:
thread767-1657967


Mike
---------------------------------------------------------------
"To be alive is to revel in the moments, in the sunrise and the sunset, in the sudden and brief episodes of love and adventure,
in the hours of companionship. It is, most of all, to never be paralyzed by your fears of a future that no one can foretell."
 
Please don't set up new threads on the same topic. I responded in the original thread.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top