Running Progress Bar

sankar
Member Posts: 79
Hi Experts,
Can any one tell me how to run a progress bar in navision 3.7.. i am creating search function i need this run....
Sorry i have posted this into navision3.6.. please can any one help
Can any one tell me how to run a progress bar in navision 3.7.. i am creating search function i need this run....
Sorry i have posted this into navision3.6.. please can any one help
Everything is Possible
0
Comments
-
What does the "search function" do? Goes trough filtered records usin an loop:?:
if yes:
Text0001 = 'Processbar @'
RecordVar.setrange(...);
Counts := RecordVar.count;
if counts <> 0 then begin
RecordVar.findset;
DLG.open(Text0001)
repeat
i += 1;
DLG.update(1,round(i*100/counts*100,1));
until RecordVar.next = 0;
DLG.close;
end;
DLG ist an variable type dialog
i is an integer
counts is an integer
Text0001 is an TextConst
RegardsDo you make it right, it works too!0 -
Hi,
Thank you for the reply.. i am getting division 0/0 error.. can u specify whyEverything is Possible0 -
Hi,
As you might already know the division by zero comes when deviding by zero lol... I guess you have no recs in your record (look at the assign Counts := RecordVar.count;)0 -
i beleive, that the variable counts has an zero value.
Lat me take a look into your code snippet
regardsDo you make it right, it works too!0 -
I put the responses of the other post in this one, because the other post will be deleted later. And some posts are usefull.Arhontis wrote:Hi,
Please don't multiple post on different forums...
Declare a text constant like Text001 and value:
'Doing somethin @'
Make a couple of variables:
i:integer
NoOfRecs:integer
Window:Dialog
before the code loop:NoOfrecs := Somerecord.COUNT; i:=0; Window.Open(Text001); //to open the window
in the code loop do something like:Window.UPDATE(1, ROUND(i/ NoOfRecs * 10000,1));//to update the progress bar... i:=i+1;
After the code loop:Window.Close;//to close the window
In case you use the progress bar control on a form you should do the same when updating the value that the progressbar shows (assign with the 10000 calculation above)...
I hope this helps...Savatage wrote:Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
And what you are doing, if there are no records? There is no such a code, which will prevent you from updating the dialog with values 0/0 when no records are found... ;-)0
-
As you already know there is a development rule: "When dividing always check before if it is zero."
But I have always used it in the OnAfterGetRecord of reports, so it always has something... [-X 8)0 -
Hi,
Thank u experts i got the progress bar running in report.. i want to do the same in form.... how can i do that where i want to code this...Everything is Possible0 -
Look above, there is some info at the post that kriki moved here...
It is almost the same, but you must use a progressbar from the toolbox on your form and assign a var and move your var like the UPDATE you did already...0 -
Check also my post in this topic: http://www.mibuso.com/forum/viewtopic.php?t=10516Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!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