Applicable Versions: 5.50.0073 Onwards
You may wish to control the refreshing of data in a dashboard from a Progress batch process, to say update the data overnight. In order to achieve this, you cannot use the dashboard control as it is a visual control which cannot be rendered in a batch process.
A procedure that will open and refresh all the queries in a dashboard can be downloaded at the below.
The parameters for the procedure are described below:
Parameter | Type | Description |
ipFileName | CHARACTER | A character input parameter that should contain the fully qualified path to the dashboard file. |
sLogFile | CHARACTER | A character input parameter that defines a log file to log the process. The log file can grow very rapidly, so only use this option to debug a problem. By default, pass in a blank string which will turn logging off. |
sUsername | CHARACTER | A character input parameter that defines a username required to log in to DataPA OpenAnalytics. If not required, pass in a blank string. |
sPassword | CHARACTER | A character input parameter that defines a password used to log in to DataPA OpenAnalytics. If not required, pass in a blank string. |
opSuccess | LOGICAL | A logical output value that if true, indicates the procedure completed OK. |
opError | CHARACTER | A character output parameter that indicates why the procedure did not complete OK. |
For example the following procedure will all queries in a test dashboard...
DEFINE VARIABLE opSuccess AS LOGICAL NO-UNDO.
DEFINE VARIABLE opError AS CHARACTER NO-UNDO.
RUN C:\Users\Nick.DATAPA\Desktop\silentrefreshdashboard.p
(INPUT "C:\Test\TestRefresh.edp",
INPUT "C:\Test\RefreshLog.txt",
INPUT "Nick",
INPUT "password",
OUTPUT opSuccess,
OUTPUT opError).
IF opSuccess
THEN MESSAGE "Refresh Succeeded" VIEW-AS ALERT-BOX.
ELSE MESSAGE "Refresh Failed: " + opError VIEW-AS ALERT-BOX.