on 03-07-2018 10:48 PM
Referencing code posted by @abhilash.kumar on 06/21/2012, I am trying to collect detail records in a single field. In some cases, the code below works, but in others, I receive an error stating, "String length is less than 0 or not an integer". I realize that I'm getting this error because there are some blank values being returned and the code is subtracting from zero, I just don't know how to fix it and after perusing discussions, I haven't came to a conclusion. Any help is greatly appreciated!
This is going into my details section:
WhilePrintingRecords;
stringvar array arr;
numbervar i;
if not({Customer.Country} in arr) then
(
i := i + 1;
redim preserve arr[i];
arr[i] := {Customer.Country};
);
arr[i]
This is going into my footer section:
WhilePrintingRecords;
stringvar array arr;
stringvar fin;
numbervar j;
for j := 1 to ubound(arr) do
fin := fin + arr[j] + ", ";
left(fin,len(fin)-2);
Referencing: https://archive.sap.com/discussions/thread/3195910
Hi Scott,
Change the code on the footer to:
WhilePrintingRecords;
stringvar array arr;
Join(arr, ", ");
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
9 | |
9 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.