| Stonefield Query SDK |
| Application.BeforeSetup |
Note: unlike Application.AfterSetup, Application.BeforeSetup is called even if a report is run from the Windows command line or another application, so it might be a more suitable location for setup tasks.
Parameters
A reference to the Stonefield Query Application object.
Return Value
True if the application should continue, False if it should terminate.
Example
This example retrieves some information from the APP.INI file in the project directory and stores it in a new property of the Application object.
Visual FoxPro
lparameters toApplication as SQApplication
local lcType
lcType = toApplication.GetINIValue(toApplication.ProjectDirectory + 'APP.INI', ;
'Settings', 'Type')
toApplication.AddProperty('Type', lcType)
return .T. VBScript
function Main(Application)
Type = Application.GetINIValue(Application.ProjectDirectory + "APP.INI", _
"Settings", "Type")
Application.AddProperty("Type", Type)
Main = True
end function JavaScript
function Main(Application) {
var Type ;
Type = Application.GetINIValue(Application.ProjectDirectory + 'APP.INI',
'Settings', 'Type') ;
Application.AddProperty('Type', Type) ;
return true ;
} C#
Please note that the method in this script must be named Application_BeforeSetup.
public static bool Application_BeforeSetup(SFQApplication sfqApplication)
{
string type = sfqApplication.GetINIValue(sfqApplication.ProjectDirectory + "APP.INI", "Settings", "Type");
sfqApplication.AddProperty("Type", type);
return true;
} VB.NET
Please note that the method in this script must be named Application_BeforeSetup.
public shared function Application_BeforeSetup(sfqApplication as SFQApplication) as Boolean
Dim Type as String = sfqApplication.GetINIValue(sfqApplication.ProjectDirectory + "APP.INI", _
"Settings", "Type")
sfqApplication.AddProperty("Type", Type)
return true
End FunctionSee Also
Application.AfterSetup | Application.Shutdown | Scripts
| Last Updated: 06/01/11 |