I made this for user to view progress during an accounts internal audit process, without message interruptions (and without using traceln() to view only after all is done)
That once completed can still view all results and take action before closing.
In my case I also open data dialogs for interrogation and journal corrections before continuing.
This is the function: copy and save it as a text file to import or create a function and paste the code.
Call it with the text of the process as first parameter as you would with traceln().
Optionally .f. as the second parameter for remaining on the line - default is .t. = CRLF
Can test it by running the following in a script or the IW - i placed some lines with delay to give the idea.
added: must dim shared progrep before calling the function
That once completed can still view all results and take action before closing.
In my case I also open data dialogs for interrogation and journal corrections before continuing.
This is the function: copy and save it as a text file to import or create a function and paste the code.
Code:
Index of Functions ---------------- 1: progress_report Function Name ( 1): progress_report -------------------------------------------------------------------------------- FUNCTION Progress_report AS C (Lasttext AS C, lfeed AS L = .t.) progrep = progrep+lasttext+if(lfeed,crlf()," - ") p_body=<<%dd% {region} {font=arial,12,b} Progress Report {ENDREGION}; {xmargin=2,1} {units=F} {ysize=3} {position=?.2,?.1} {font=arial,12} %dd%+progrep ui_modeless_dlg_box("progress",p_body) END FUNCTION End Function ( 1)---------------------------------------------------------------
Optionally .f. as the second parameter for remaining on the line - default is .t. = CRLF
Can test it by running the following in a script or the IW - i placed some lines with delay to give the idea.
added: must dim shared progrep before calling the function
Code:
dim shared progrep as c= "" progress_report("Checking GL balance",.f.) wait_until(.f.,.1,1) 'code doing some stuff progress_report("Balanced") wait_until(.f.,.1,.5) progress_report("Checking Transactions",.f.) wait_until(.f.,.1,.7) progress_report("Please Edit 10992") Progress_report("Completed Master ledgers checking")