I am creating a report which has 2 data items at this point. Sales Header and Sales Line.
I am getting all the Item Category Code of my Line Items, adding it to a list, filtering the duplicate and putting it in a Text Variable which I want to print on the report. The Var won't print on the report (rdl)
Here is my code;
trigger OnPostDataItem()
var
sourcei: Integer;
filteredi: Integer;
intcount: Integer;
sourcelistcount: Integer;
filteredlistcount: Integer;
temp: Text[100];
begin
sourcei := 1;
filteredi := 1;
intcount := 1;
sourcelistcount := sourcelist.Count();
filteredlistcount := filteredlist.Count();
filteredlist.Insert(filteredi, sourcelist.Get(sourcei));
sourcei := sourcei + 1;
for intcount := 1 to sourcelistcount do begin
IF (sourcelist.Get(sourcei) <> filteredlist.get(filteredi)) then begin
filteredi := filteredi + 1;
filteredlist.Insert(filteredi, sourcelist.Get(sourcei));
end
else
sourcei := sourcei + 1;
end;
Clear(filteredi);
Clear(FilteredIC);
filteredi := 1;
intcount := 1;
foreach temp in filteredlist do
FilteredIC := FilteredIC + ' / ' + temp;
ItemCategoryCombined := DelStr(FilteredIC, 1, 3);
Message(ItemCategoryCombined);
end;
I get precisely what I want to print in the variable ItemCategoryCombined.
Adding the Column(ItemCategoryCombined; ItemCategoryCombined) in Sales Line doesn't print the value of ItemCategoryCombined in the report (rdl).
Any hint what am I missing?
Thanks in advance.
0