about 1 minute to read

The UpdateProgressBar method updates the value of the progress bar in the Reports Explorer status bar. This can be used to inform the user of the progress of a long-running script. The progress bar doesn't display unless the value is non-zero.

Syntax

UpdateProgressBar(Percentage as Numeric)

Parameters
Percentage
The percentage value to display (for example, 50 for a process that is half done).

Return Value
None.

Example
This example updates the progress bar as a script executes.

Visual FoxPro

* do some processing here
SQApplication.UpdateProgressBar(25)
* do some processing here
SQApplication.UpdateProgressBar(50)
* do some processing here
SQApplication.UpdateProgressBar(75)
* do some processing here
SQApplication.UpdateProgressBar(100)
* Hide the progress bar.
SQApplication.UpdateProgressBar(0)

VBScript

function Main(Application)
' do some processing here
SQApplication.UpdateProgressBar(25)
* do some processing here
SQApplication.UpdateProgressBar(50)
* do some processing here
SQApplication.UpdateProgressBar(75)
* do some processing here
SQApplication.UpdateProgressBar(100)
* Hide the progress bar.
SQApplication.UpdateProgressBar(0)
end function

JavaScript

function Main(Application) {
// do some processing here
Application.UpdateProgressBar(25) ;
// do some processing here
Application.UpdateProgressBar(50) ;
// do some processing here
Application.UpdateProgressBar(75) ;
// do some processing here
Application.UpdateProgressBar(100) ;
// Hide the progress bar.
Application.UpdateProgressBar(0) ;
}

C#

// do some processing here
SQApplication.UpdateProgressBar(25);
// do some processing here
SQApplication.UpdateProgressBar(50);
// do some processing here
SQApplication.UpdateProgressBar(75);
// do some processing here
SQApplication.UpdateProgressBar(100);
// Hide the progress bar.
SQApplication.UpdateProgressBar(0);

VB.NET

' do some processing here
SQApplication.UpdateProgressBar(25)
' do some processing here
SQApplication.UpdateProgressBar(50)
' do some processing here
SQApplication.UpdateProgressBar(75)
' do some processing here
SQApplication.UpdateProgressBar(100)
' Hide the progress bar.
SQApplication.UpdateProgressBar(0)

See also

Application Object | ShowStatus

© Stonefield Software Inc., 2024 • Updated: 06/06/16
Comment or report problem with topic