[ISSUE] Printing variable of PostDataItem in the Report

mysamza
Member Posts: 66
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.
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
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions