The Application object is the top object in the Stonefield Query object model. A reference to this object is passed to every event and data object script so the script can interact with Stonefield Query as necessary. User-defined scripts can access the Application object through the built-in SQApplication object. Through the Application object, a script has access to every other object in the object model.

Properties

NameData TypeDescriptionStatus
ApplicationDataDirectoryStringThe path for Stonefield Query's data files, such as the users and roles tables.Read-only
ApplicationDirectoryStringThe path for the Stonefield Query program files.Read-only
ApplicationNameStringThe name assigned to the Stonefield Query project. This is the value specified in the Application Name configuration setting.Read-only
BasicLicenseBooleanTrue if the current user is using a Basic license. This allows a script to turn on or off certain functionality in that case.Read-only
BatchReportRunningBooleanTrue if Stonefield Query is currently running a batch report. This allows a script such as DataEngine.BeforeResultSetRetrieved to do different things depending on whether a report is running from a batch report or not.Read-only
CalledFromProxyBooleanTrue if Stonefield Query is being run from the SQProxy object, False if not. This allows your scripts to use different behavior, such as not displaying dialogs, in that case.Read-only
CanEditReportsBooleanTrue if the user can add or edit reports, False if not.Read-write
DashboardChartIntegerThe chart number being generated when a dashboard is previewed and 0 otherwise. This allows a script such as DataEngine.BeforeResultSetRetrieved to do different things for different charts such as prompting for values for the first one.Read-only
DataEngineObjectA reference to the DataEngine object.Read-only
LicenseIntegerThe license type for the current user: 1 = Basic, 2 = Ultimate, 3 = Viewer (for backward compatibility), 5 = Pro, 6 = Premium. It's better to use the BasicLicense, ProLicense, PremiumLicense, or UltimateLicense properties instead.Read-only
ParametersObjectA reference to the Parameters collection.Read-only
PremiumLicenseBooleanTrue if the current user is using a Premium license. This allows a script to turn on or off certain functionality in that case.Read-only
ProLicenseBooleanTrue if the current user is using a Pro license. This allows a script to turn on or off certain functionality in that case.Read-only
ProjectDirectoryStringThe path for the open project's configuration files.Read-only
ReportsDirectoryStringThe path for the reports files.Read-only
ReportEngineObjectA reference to the ReportEngine object.Read-only
SerialNumberStringThe serial number for the current license.Read-only
ShortApplicationNameStringThe abbreviated name assigned to the Stonefield Query project. This is the value specified in the Short Application Name configuration setting.Read-only
TargetApplicationDirectoryStringThe target application's program directory. This value is blank if the Need Target Application Directory configuration setting is False.Read-only
TimeZoneDescStringContains the descriptive name of the local time zone.Read-only
TimeZoneOffsetIntegerContains the offset for the local time zone from GMT in seconds (it even accounts for daylight saving time). This can be used to display local time from fields containing GMT time.Read-only
UltimateLicenseBooleanTrue if the current user is using an Ultimate license. This allows a script to turn on or off certain functionality in that case.Read-only
UsersObjectA reference to the Users collection.Read-only
VersionStringThe Stonefield Query version number.Read-only

Methods

NameDescription
AddPropertyAdds a property to the Application object.
CreateObjectCreates an instance of the specified class.
DecryptDecrypts a string.
EncryptEncrypts a string.
ExecuteExecutes an application.
GetDataSetFieldNameReturns the name of a field as it appears in the data set for a report.
GetINIValueReads a value from the specified INI file.
GetRegistryValueReads a value from the Windows Registry.
GetValuesCollectionReturns a values collection object.
LogLogs a message to the diagnostic file.
OpenFormOpens an instance of the specified form.
PromptUserForValueAsks the user for a value.
RegisterCursorToCloseAfterRunRegisters a cursor to be closed at the end of a report run.
SetINIValueWrites a value to the specified INI file.
SetRegistryValueSaves a value in the Windows Registry.
SetViewerLicensesSets the number of viewer licenses available.
ShowErrorMessageDisplays an error message, similar to the MESSAGEBOX() function.
ShowStatusDisplays a message in the Reports Explorer status bar.
ShutdownTerminates the Stonefield Query session.
UpdateProgressBarUpdates the value of the progress bar in the Reports Explorer status bar.

© Stonefield Software Inc., 2018 • Updated: 03/09/18
Comment or report problem with topic