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!
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.
Answers
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
Regards
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.
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.