Skip to Content
avatar image
Former Member

dont want increment unique values onto the next row of records.

The below formula works for me, but i got an issue where the following records it increment onto the next row.

for example...

row 1 - a,b,c

row 2 - (should only be a,c,d) but incremented --> a,b,c,a,c,d

row 3 - (should only be b,c,d) but incremented --> a,b,c,a,c,d,b,c,d

please advise, thank you!

1) Create a formula with this code and place it on the Details Section:

WhilePrintingRecords;
stringvar array plant;
redim preserve plant[GroupNumber];
plant[GroupNumber] := GroupName ({0PUR_C01_YQRY_0PUR_C01_003.[0PLANT]});

2) Create this formula to display a concatenated list of Plant Names and place this on the Report Footer:

WhilePrintingRecords;

stringvar array plant;

Join(plant, ", ");

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jan 12 at 07:48 AM

    Hi Sony,

    Modify the formula on the Details to:

    WhilePrintingRecords;
    stringvar array plant;
    numbervar inc;
    if NOT({0PUR_C01_YQRY_0PUR_C01_003.[0PLANT]} IN plant) 
    Then
    (
      inc := inc + 1;
      redim preserve plant[inc];
      plant[inc] := {0PUR_C01_YQRY_0PUR_C01_003.[0PLANT]}
    );
    '';

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 12 at 03:04 PM

    oh wow, didn't expect such a fast response to this since someone asked about this a couple years ago. Thanks!

    I'll give a try. Thanks again

    Add comment
    10|10000 characters needed characters exceeded