Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Array not printing correctly from main to subreport

Hi All,

I am using an array to print values from a main report to a subreport.

Here's the array formula I use in the group footer of my main report:

whileprintingrecords;

stringvar strCalls;

strCalls:=totext(Sum ({Group.Calls}, {Group.GroupNumber}))"^"strCalls

this produces a string of:

number4number3number2^number1

Here's the formula I use in the group header of my subreport:

WhileReadingRecords;

stringVar array arr;

numberVar i;

arr:=split({?Pm-@Calls Array},"^");

i:=i+1;

if i<= Count(arr) and arr<i><>"" then

arr<i>

else

""

this produces number4 on the first printed header and then blank for the rest of the headers.

My question is why are number3,number2 and number1 not printing?

Thank you in advance.

Former Member
replied

Try this

WhilePrintingRecords;
stringVar array arr; 
numberVar i;
arr:=split({?Pm-@Calls Array},"^");
i:=i+1;
if i<= Count(arr) then
arr<i>
else 
""

Regards,

Raghavendra

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question