Progress Dialogbox flickers

nverma
Member Posts: 396
I wrote the following code to display a dialogbox/progressbar. It does work (no errors are thrown), but it causes the progress dialogbox to popup and close (giving it a flickering effect). It seems like it opens and closes really quick. I am not really sure what I am doing wrong.
Please advice!
This is a processing only report that is getting run from RTC.
No where in my code, am I closing the progressdialog box and even when I specify a filtering criteria and only one record meets that criteria, it still opens and closes the progressdialog 5-6 times.
Please advice!
DV Ledger Entry - OnPreDataItem()
TotalRecords := "DV Ledger Entry".COUNT;
ProgressDialog.OPEN('#1##########################################');
DV Ledger Entry - OnAfterGetRecord()
RecordCounter += 1;
PercentageBar := ROUND(10000 * RecordCounter / TotalRecords,1);
ProgressDialog.UPDATE(1, PercentageBar);
This is a processing only report that is getting run from RTC.
No where in my code, am I closing the progressdialog box and even when I specify a filtering criteria and only one record meets that criteria, it still opens and closes the progressdialog 5-6 times.
0
Answers
-
Hi,
Is this DataItem indented below another one?
Do you have a ProgressDialog.CLOSE in the DV Ledger Entry - OnPostDataItem?
Dialog should only be opened once - usually on the first DataItem of the report and closed on the DataItem - OnPostDataItem or on the Report - OnPostReport
Regards0 -
Thanks for the reply Albert.
DV Ledger Entry is indented under Constituent Ledger Entry dataitem. Hence, it is below another dataitem. However, all my filters are getting applied on the "DV Ledger Entry" table. Now, I understand why it is flicking (because its another dataitem). What can I do to not make it flicker1???
I tried moving the code to the first dataitem and my RTC crashed.0 -
Thank you thank you thank you...
I got it working...
I moved the code to the first dataitem and made slight modifications to the code and now its working perfectly.
Here is the final working code.Constituent - OnPreDataItem()
TotalRecords := COUNT;
ProgressDialog.OPEN('@\');
Constituent - OnAfterGetRecord()
RecordCounter += 1;
PercentageBar := ROUND(RecordCounter/TotalRecords *10000,1);
ProgressDialog.UPDATE(1, PercentageBar);
Constituent - OnPostDataItem()
ProgressDialog.CLOSE;0 -
Glad you got it sorted. =D>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