Crystal 报告 - 下标必须介于 1 和数组大小之间
Crystal Reports - A Subscript must be between 1 and the size of the array
以下函数 returns "A subscript must be between 1 and size of array"- 在 Crystal 报告 2013 中 运行 时出错。我试图解决这个问题,但不确定如何解决这个错误。
Whileprintingrecords;
stringvar array sMessage := split({Inventory.MessageText},",");
If UBound(sMessage ) > 0 then
(
Trim(sMessage [1]) & Chr(13) & Trim(sMessage [2]);
)
我也试过这个...
Whileprintingrecords;
stringvar array sMessage := split({Inventory.MessageText},",");
Numbervar Array numbers;
Redim numbers[Ubound(sMessage)];
If UBound(numbers) > 0 then
(
Trim(sMessage [1]) & Chr(13) & Trim(sMessage [2]);
)
有什么想法吗?
Examples
The following examples are applicable to Crystal syntax:
[100,233,466,998][3]
Returns 466; 466 is the third element in the array.
LNAME [1]
Returns "S", where LNAME = "Smith".
Postal [6]
Returns "V", where Postal Code = "T5A 9V2" (the space between A and 9 counts as an element).
{customer.POSTAL CODE} [5 to 7]
Returns "9V2", where Postal Code = "T5A 9V2".
{file.ITEMNUMBER} [4 to 5]
Returns "40", where ItemNumber is A1/4020/B10.
以下函数 returns "A subscript must be between 1 and size of array"- 在 Crystal 报告 2013 中 运行 时出错。我试图解决这个问题,但不确定如何解决这个错误。
Whileprintingrecords;
stringvar array sMessage := split({Inventory.MessageText},",");
If UBound(sMessage ) > 0 then
(
Trim(sMessage [1]) & Chr(13) & Trim(sMessage [2]);
)
我也试过这个...
Whileprintingrecords;
stringvar array sMessage := split({Inventory.MessageText},",");
Numbervar Array numbers;
Redim numbers[Ubound(sMessage)];
If UBound(numbers) > 0 then
(
Trim(sMessage [1]) & Chr(13) & Trim(sMessage [2]);
)
有什么想法吗?
Examples
The following examples are applicable to Crystal syntax:
[100,233,466,998][3]
Returns 466; 466 is the third element in the array.
LNAME [1]
Returns "S", where LNAME = "Smith".
Postal [6]
Returns "V", where Postal Code = "T5A 9V2" (the space between A and 9 counts as an element).
{customer.POSTAL CODE} [5 to 7]
Returns "9V2", where Postal Code = "T5A 9V2".
{file.ITEMNUMBER} [4 to 5]
Returns "40", where ItemNumber is A1/4020/B10.