Duplicate values remove in reports

dheebans
Member Posts: 36
Dear all,
I have one Doubt in Generate Report,
that is,
I have Values in array structure like a :=
Now i want to remove duplicate record, and also show that value in one time,
B[1] := 45;
B[2] := 46;
b[3] := 47;
I Hope yopur Valuable Answer.
Advanced thanks,
Regards
DheebanS
I have one Doubt in Generate Report,
that is,
I have Values in array structure like a :=
Now i want to remove duplicate record, and also show that value in one time,
B[1] := 45;
B[2] := 46;
b[3] := 47;
I Hope yopur Valuable Answer.
Advanced thanks,
Regards
DheebanS
--
Thanks & Regards
DheebanS
Thanks & Regards
DheebanS
0
Comments
-
the easiest way is not to use an array but temporary table based on "integer" table.
here you can insert your values with anmyintegertemptable.number := myintegervalue; IF myintegertemptable.INSERT then;
then you can show the temporary table in the report (there's an "how to" in mibuso about how to show a temptable)0 -
Thanks your Replay,
I am using Text array Variable,
If possible please send any link about, create tem table.
Thanks & Regards
Dheeban.S--
Thanks & Regards
DheebanS0 -
Just a quick brainstorm on your problem:
for i := 1 to ARRAYLEN(a) do begin found := false; for j := 1 to ARRAYLEN(b) do begin if a[i] = b[j] then found := TRUE; end; if found then begin b[i] := 0; end else begin b[i] := a[i]; end; end;
Maybe an approach for you.0 -
@egnaz's: that approach will create empty elements in the array, i don't know if it's what he wants :-k let's see what he say
if your elements are texts, the same approach i described is still valid: you can create a new table with one text field only and use this new table instead of the "integer" table i told you before.
NOTE: if you use your new table ONLY as temporary, you don't even need to create that table in customer's license object range :thumbsup: you can create it as 99999, for example0 -
I'm with you. I think a temp. table is the best solution. You can also use a buffer table as temp. table for example the excel buffer.
My approach was only for finding a solution/approach for arrays. The empty array element is a behavior I had in mind so this is only an approach and perhaps he can skip "blank" elements in the report. Nobodys knows atm what the report does with this array values.
Best solution will be a temp. table of course.
Regards,
egnaz0 -
Thanks your ideas,
I am using TemTable,
Now i found Fields already exit error.
how can i remove this error.
Thanks Regards
DheebanS--
Thanks & Regards
DheebanS0 -
-
while i am inserting records in a new table
Using table name TemInvoice,
The TempInvoice already exit
Identification values ''12345 '
Herewith i attached error Doc
Thanks & Regards
DheebanS--
Thanks & Regards
DheebanS0 -
delete temporary table in the begining of your code
TempTable.DELETEALL;0 -
](*,) ](*,) ](*,) ](*,) ](*,)
i think you have to study some materials before starting to develop
1. do you know why i've suggested you to use a temporary table in order to avoid duplicates, or are you blindly following my suggestion?
2. do you know what is a primary key?and why you cannot have 2 records with the same primary key in the same table?
3. no errors can arise if you have written the code as i do: "IF INSERT THEN;"
Sorry, i've been a little rude, but it's not fair to ask questions like this in the forum: i hope you have a senior developer near you that supports you with these kind of questions.
P.S.: DELETEALL is not specifically needed in your piece of code, i guess it won't solve the problem.0 -
I agree your commands,
I Don't have Senior consultant, so only i am asking like this error,
I am using temptable.Deleteall. Its allow to duplicate Values.
Just i want one help,
How to compare Array, the compare Value is found or not.
Thanks
DheebanS--
Thanks & Regards
DheebanS0 -
Hi mirko,
Thanks a lot your valuable hints, i hot result using Temp Table.
Thanks & Regards
DheebanS :thumbsup:--
Thanks & Regards
DheebanS0
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