Stonefield Query calls the Application.ReportsExplorerReady script at application startup when the Reports Explorer is ready to display reports. One use of this script is to customize the ribbon.
Parameters
A reference to the Stonefield Query Application object.
Return Value
Any value (Stonefield Query ignores the return value).
Example
See the Customizing the Ribbon topic for sample code showing how to customize the ribbon.
Example
Suppose you want to hide the Schedule Report function and remove the Chart and Dashboard wizards if Stonefield Query hasn't been activated. The following script in Application.ReportsExplorerReady does this.
Visual FoxPro
lparameters toApplication as SQApplication
if SQApplication.Users.GetLicenseCount() = 0
* Hide the Schedule Report function in the menu.
oMenu.ToolsPad.ToolsScheduleReport.lVisible = .F.
* Remove the Chart and Dashboard wizards.
oApp.oWizardForm.oWizardsCollection.Remove('C')
oApp.oWizardForm.oWizardsCollection.Remove('D')
endif
Example
Suppose you want to disable editing or creating reports if Stonefield Query hasn't been activated. The following script in Application.ReportsExplorerReady does this.
VBScript
function Main(Application)
if SQApplication.Users.GetLicenseCount() = 0 then
SQApplication.CanEditReports = False
end if
end function
JavaScript
function Main(Application) {
if (SQApplication.Users.GetLicenseCount() = 0)
{ SQApplication.CanEditReports = false ; }
}
C#
Please note that the method in this script must be named Application_ReportsExplorerReady.
public static void Application_ReportsExplorerReady(SFQApplication sfqApplication)
{
if (sfqApplication.Users.GetLicenseCount(0) == 0)
{
sfqApplication.CanEditReports = false;
}
return true;
}
VB.NET
Please note that the method in this script must be named Application_ReportsExplorerReady.
public shared function Application_ReportsExplorerReady(sfqApplication as SFQApplication) as Boolean
if (sfqApplication.Users.GetLicenseCount(0) = 0)
sfqApplication.CanEditReports = false
end if
Return True
End Function
See also
Application.ReportsExplorerActivated | Scripts© Stonefield Software Inc., 2024 • Updated: 02/12/21
Comment or report problem with topic