Hi All,
I'm using Crystal 10
When the report is run, the following error is received against the formula below;
error: A subscript must be between 1 and the size of the array.
formula:
if ubound(split({tableA.fieldA},"\"[7])) > 0 then
split({tableA.fieldA},"\")[7]
else
""
Here is a few samples of the data
record1 \v1\v2\v3\v4\v5\v6
record2 \v1\v2\v3
record1 reports fine but record2 returns the above message. record2 when evaluated returns a null value. I've tried utilizing isnull, still no good.
Also I've tried the following formula;
//if ubound(split({tableA.fieldA},"\",1)) > 0 then
//split({tableA.fieldA},"\")[1]
//else
//if ubound(split({tableA.fieldA},"\",2)) > 1 then
//split({tableA.fieldA},"\")[2]
//else
//if ubound(split({tableA.fieldA}"\",3)) > 2 then
//split({tableA.fieldA},"\")[3]
** The above I continued to 7
Now this ran but no data for any of the records.
Bottom line is, I want to print the 6th value, if the value does not exist then print ""
WOW, I'm stumped....
Thanks for your help!!!
I'm using Crystal 10
When the report is run, the following error is received against the formula below;
error: A subscript must be between 1 and the size of the array.
formula:
if ubound(split({tableA.fieldA},"\"[7])) > 0 then
split({tableA.fieldA},"\")[7]
else
""
Here is a few samples of the data
record1 \v1\v2\v3\v4\v5\v6
record2 \v1\v2\v3
record1 reports fine but record2 returns the above message. record2 when evaluated returns a null value. I've tried utilizing isnull, still no good.
Also I've tried the following formula;
//if ubound(split({tableA.fieldA},"\",1)) > 0 then
//split({tableA.fieldA},"\")[1]
//else
//if ubound(split({tableA.fieldA},"\",2)) > 1 then
//split({tableA.fieldA},"\")[2]
//else
//if ubound(split({tableA.fieldA}"\",3)) > 2 then
//split({tableA.fieldA},"\")[3]
** The above I continued to 7
Now this ran but no data for any of the records.
Bottom line is, I want to print the 6th value, if the value does not exist then print ""
WOW, I'm stumped....
Thanks for your help!!!