Unique Record Filtering

Lamba
Member Posts: 263
Hi,
I need to filter the main project and show the data in excel filtering on date range, the condition is the same name must not repeat
Eg: In this case the name "BEAS PROJECTS - DIRECT" comes twice, it must come once..
I tried following code:
i := 1;
Rec50023.RESET;
Rec50023.SETRANGE("Start Date",StartDate,EndDate);
IF Rec50023.FINDFIRST THEN
BEGIN
MainProject := Rec50023."Main Project";
REPEAT
Rec50023_1.RESET;
Rec50023_1.SETRANGE("Main Project",'%1',MainProject);
IF Rec50023_1.FINDFIRST THEN
MainProjectFinal := Rec50023_1."Main Project";
i := i + 1;
UNTIL Rec50023.NEXT = 0;
END;
On putting message the same project name is repeating, i know why as per the assignment in the following code:
MainProject := Rec50023."Main Project";
what must i do, so it takes the next Main Project name and any name must not repeat itself.
I need to filter the main project and show the data in excel filtering on date range, the condition is the same name must not repeat
Eg: In this case the name "BEAS PROJECTS - DIRECT" comes twice, it must come once..
I tried following code:
i := 1;
Rec50023.RESET;
Rec50023.SETRANGE("Start Date",StartDate,EndDate);
IF Rec50023.FINDFIRST THEN
BEGIN
MainProject := Rec50023."Main Project";
REPEAT
Rec50023_1.RESET;
Rec50023_1.SETRANGE("Main Project",'%1',MainProject);
IF Rec50023_1.FINDFIRST THEN
MainProjectFinal := Rec50023_1."Main Project";
i := i + 1;
UNTIL Rec50023.NEXT = 0;
END;
On putting message the same project name is repeating, i know why as per the assignment in the following code:
MainProject := Rec50023."Main Project";
what must i do, so it takes the next Main Project name and any name must not repeat itself.
0
Comments
-
Hi,
Refer Here
In your case you can use either the logic in above link for Group header or Group Footer.
Thanks & Regards,
Saurav Dhyani
Do you Know this About NAV?
Connect - Twitter | Facebook | Google + | YouTube
Follow - Blog | Facebook Page | Google + Page0
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