Hi Prasad,
Change the code to:
shared stringvar array LOB;
shared numbervar array PMCCount;
shared numbervar x:=x+1;
redim preserve LOB[x];
redim preserve PMCCount[x];
LOB[x]:={LOB_c.name};
PMCCount[x]:=sum ({@ProcessMapping1}, {LOB_c.Name});
Note:here @ProcessMapping1 is formual field,its having formulas like if {pres_level1}=true then 1 else 0
in the main report the below formulas i have used
shared stringvar array LOB;
shared numbervar array PMCCount;
local numbervar y;
local numbervar PMCTot;
for y:=1 to ubound(LOB) do
(
if {LOB_c.name}=LOB[y] then
(
PMCTot := PMCCount[y] + sum({@ProcessMapping2}, {LOB_c.Name})
)
else
(
PMCTot := sum({@ProcessMapping2}, {LOB_c.Name})
);
);
PMCTot;
-Abhilash