alternative to Marked Only on Forms?

knight
Member Posts: 45
Just completed a project for a client where there is a form similar to the one below. It contains a tabcontrol for filtering and a subform based on table 15. The client requires the ability to enter filters in the tabcontrol and when the flowfields are calculated, only if at least one of the following fields (“Net Change","Budgeted Amount",Commitment) is not equal to 0 then the line should be displayed in the subform. Now l have this working as seen the code below, but the problem l have is MARKEDONLY seems to be very very very slow when used on larger amounts of data and as a result the client is complaining.
Is there another way around this without using MARKEDONLY?
Sample code:
Is there another way around this without using MARKEDONLY?
Sample code:
CurrForm.SubForm.FORM.ClearMarks; rGLAcc.CLEARMARKS; rGLAcc.COPYFILTERS(Rec); IF rGLAcc.FIND('-') THEN REPEAT rGLAcc.CALCFIELDS("Net Change","Budgeted Amount",Commitment); IF (rGLAcc."Net Change" <> 0) OR (rGLAcc."Budgeted Amount" <> 0) OR (rGLAcc.Commitment <> 0) THEN rGLAcc.MARK(TRUE); UNTIL rGLAcc.NEXT = 0; CurrForm.SubForm.FORM.SETTABLEVIEW(rGLAcc); CurrForm.SubForm.FORM.MarkedOnly;<- Custom Function to set Marked Only to Subform
0
Comments
-
Maybe you can add a extra Boolean Field to your Table.
e.g. "Selected" (Don't make this field visible on the form en set the
property Editable on False).
After you have set your filters you can check your lines.
If a line meets your criteria you can set the field: "Selected" on TRUE.
After you have checked all your records you can change your sorting
to "Selected" (if you have made a key from this field) and then
set the Tabbleview again.
If this functionality is not used a lot, then adding a extra key may not
be a option, because of the performance of the database. :!:
You also have to reset the "Selected" fields again. When you start checking the lines they have to be FALSE :!:0 -
it looks like you have a lot of gL entries behind ? a lot of calculations are done behind.
am I correct that After applying more filters the calculations gets even slower.
how many filters do you apply, which are they ?
can be improved with new keys with only fields that you use for filters, but this key must be as high as possible in key definitions...®obi
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯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