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

All properties except CanEditReports are read-only.

NameData TypeDescription
ApplicationDataDirectoryStringThe path for Stonefield Query's data files, such as the users and roles tables.
ApplicationDirectoryStringThe path for the Stonefield Query program files.
ApplicationNameStringThe name assigned to the Stonefield Query project. This is the value specified in the Application Name configuration setting.
BasicLicenseBooleanTrue if the current user is using a Basic license. This allows a script to turn on or off certain functionality in that case.
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.
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.
CanEditReportsBooleanTrue if the user can add or edit reports, False if not.
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.
DataEngineObjectA reference to the DataEngine object.
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.
ParametersObjectA reference to the Parameters collection.
PremiumLicenseBooleanTrue if the current user is using a Premium license. This allows a script to turn on or off certain functionality in that case.
ProLicenseBooleanTrue if the current user is using a Pro license. This allows a script to turn on or off certain functionality in that case.
ProjectDirectoryStringThe path for the open project's configuration files.
ReportsDirectoryStringThe path for the reports files.
ReportEngineObjectA reference to the ReportEngine object.
SerialNumberStringThe serial number for the current license.
ShortApplicationNameStringThe abbreviated name assigned to the Stonefield Query project. This is the value specified in the Short Application Name configuration setting.
TargetApplicationDirectoryStringThe target application's program directory. This value is blank if the Need Target Application Directory configuration setting is False.
TimeZoneDescStringContains the descriptive name of the local time zone.
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.
UltimateLicenseBooleanTrue if the current user is using an Ultimate license. This allows a script to turn on or off certain functionality in that case.
UsersObjectA reference to the Users collection.
VersionStringThe Stonefield Query version number.

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., 1996-2019 • Updated: 12/21/18
Comment or report problem with topic