Hi Gurus,
I have a long string, that contains about 1200 records and will be increasing. So in order to get the list into a combo box (WebElements), I had to split the string into 3 arrays. The first one holds first 1000 record, the second on 1001 to 2000 records and the third one holds 2001 to 3000 record. I have the formula in Subreport and now need to pass the values from those 3 arrays into main report. I am not sure how. Any ideas???
I always get empty array in the combo. I have to something wrong with passing the arrays from subreport to main report. Please help
Would appreciate any help… Thank you!
This is my code for creating arrays:
shared stringvar Array CisloDodI;
shared stringvar Array CisloDodII;
shared stringvar Array CisloDodIII;
shared numbervar a;
if onfirstrecord or {TECHMateriálovénáklady_query.Číslo dodavatele} <> previous({TECHMateriálovénáklady_query.Číslo dodavatele}) then
(redim CisloDodI[1];
redim CisloDodII[1];
redim CisloDodIII[1];
a := 0);
(
a := a + 1;
if a <= 1000 then (Redim Preserve CisloDodI[a];
CisloDodI[a] := {TECHMateriálovénáklady_query.Číslo dodavatele});
if a in 1001 to 2000 then (Redim Preserve CisloDodII[a-1000];
CisloDodII[a-1000] := {TECHMateriálovénáklady_query.Číslo dodavatele});
if a in 2001 to 3000 then (Redim Preserve CisloDodIII[a-2000];
CisloDodIII[a-2000] := {TECHMateriálovénáklady_query.Číslo dodavatele});
);
if a <= 1000 then CisloDodI[a]
else if a in 1001 to 2000 then CisloDodII[a-1000]
else if a in 2001 to 3000 then CisloDodIII[a-2000]
And here is code for displaying the arrays in WebElements combo box.
// change the code below to match your desired output
// please see the User Guide for more information
shared stringvar array CisloDodI;
shared stringvar array CisloDodII;
shared stringvar array CisloDodIII;
stringvar ElementName:= “P_LIFNR”; // ElementName must match the name of the corresponding prompt that it is used to satisfy
stringvar ElementValues:= join(CisloDodI, ", ") + join(CisloDodII, ", ") + join(CisloDodIII, ", ");
stringvar ElementDisplays:= join(CisloDodI, ", ") + join(CisloDodII, ", ") + join(CisloDodIII, ", ");
stringvar ElementDefault:= “”;
stringvar Font:= WEFont (“Skoda Pro Office”, 10, “Black”, “Center”, false, false, “”, “”);
// you do not need to change the code below
WESelect (ElementName, ElementValues, ElementDisplays, ElementDefault, Font)
jbednar (BOB member since 2011-12-12)