NAV Progressbar

Administrator
Member, Moderator, Administrator Posts: 2,506
NAV Progressbar
Function will easily display a Progressbar with Remaining Time, IntroText & InfoText and this features:
*Supress allways if not guiallowed (NAS-Modus)
*Open a Window with Headline, Progressbar and estimated remaining time.
*Positionfield (Infofield), if activated
*Update the Window at every n step (incl. calculating est. remaining time)
*Every Screenrefresh needs a lot of time! So better use high steps or autostep.
-Steps > 0: Every n. Update will be shown on Screen
-Steps = 0: Update after every 4% (= 25 Updates from 0% to 100%)
-Steps < 0: Autostep e.g. -5: 5 Updates will be done (at 20,40,60,80,100%)
Works in all Navisions from 1 till current (1.x & 2.x: just remove the lines with guiallowed and reduce the Stringlenght to 250 and remove the Cu-ID's).
Example how you did a ProgressBar before:
Now you only need one Var in your code: The CU Progressbar.
the Same Code as above would look like this:
http://www.mibuso.com/dlinfo.asp?FileID=1165
Discuss this download here.
Function will easily display a Progressbar with Remaining Time, IntroText & InfoText and this features:
*Supress allways if not guiallowed (NAS-Modus)
*Open a Window with Headline, Progressbar and estimated remaining time.
*Positionfield (Infofield), if activated
*Update the Window at every n step (incl. calculating est. remaining time)
*Every Screenrefresh needs a lot of time! So better use high steps or autostep.
-Steps > 0: Every n. Update will be shown on Screen
-Steps = 0: Update after every 4% (= 25 Updates from 0% to 100%)
-Steps < 0: Autostep e.g. -5: 5 Updates will be done (at 20,40,60,80,100%)
Works in all Navisions from 1 till current (1.x & 2.x: just remove the lines with guiallowed and reduce the Stringlenght to 250 and remove the Cu-ID's).
Example how you did a ProgressBar before:
if guiallowed then window.open('I do something\\@1@@@@ #2###########'); Counter1 := 0 Counter2 := Rec.count repeat Counter1 += 1; if guiallowed and Counter1 mod 100 = 0 then begin window.update(1,round(Counter1/Counter2*10000),1,'>'); window.update(2,rec.code); end; do something until next = 0; if guiallowed then window.close;You need 3 vars (Counter + Dialog), have to remember allways the Guiallowed (except you are using Navi from 3.x and using the NAS), don't do a division by zero in the progressbar, use the mod (the Window.update needs VERY MUCH TIME!! Don't update it every 1/10 Sec!! The ScreenRefresh needs more Time than your code!)
Now you only need one Var in your code: The CU Progressbar.
the Same Code as above would look like this:
Progressbar.init(Rec.count,100,true,'DoSomething'); repeat ProgressBar.update(Rec.Code); do something until next = 0;reduce the Statewindow to 1 Var (CU ProgressBar) and 2 lines of code! And not slower than before!
http://www.mibuso.com/dlinfo.asp?FileID=1165
Discuss this download here.
0
Comments
-
You dont have the Vartype Duration in this Versions. So just change to Integer and you see the estimated lasting duration in Seconds.0
-
I tried using this in report : perfect!
I tried using this in a Dataport (to replace the standard status) but the status is 100% from the beginning and time goes negative...
Any idea?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