Stonefield Query has a built-in scheduler that runs reports according to a user-defined schedule. It uses the Windows Scheduler to run these reports, so Stonefield Query's scheduler is really a simplified front-end for the Windows Scheduler. One of the tasks Stonefield Query's scheduler must perform is to create an XML file containing the parameters telling Stonefield Query how to run a particular report. (This script is called "GetCommandLine" because in older versions the parameters were passed on the command line rather than in an XML file.)
This script is called after the XML has been created, giving you the opportunity to modify the parameters as necessary.
Parameters
A reference to the Stonefield Query Application object and the XML containing the parameters for the scheduled task. The format of the XML is discussed in the Command-Line Interface topic.
Return Value
The updated XML.
Example
Here's an example that's related to the example discussed in the help topic for the Parameters collection. It adds a "dbpassword" attribute (in a real-world case, the password should be specified as encrypted text and decrypted in the OpenDataSource script rather than using plain text).
Visual FoxPro
lparameters toApplication as SQApplication, tcCommandLine
local lcOldSettings, lcNewSettings, lcReturn
lcOldSettings = strextract(tcCommandLine, ;
'<settings ', '/>')
lcNewSettings = lcOldSettings + ;
' dbpassword="MyPassword"'
lcReturn = strtran(tcCommandLine, lcOldSettings, ;
lcNewSettings)
return lcReturn
See also
Scripts© Stonefield Software Inc., 2024 • Updated: 09/05/19
Comment or report problem with topic