The GetLicenseCount method returns the number of activated licenses, either by license type or the total number.


GetLicenseCount(LicenseType as Integer) as Integer

The license type for which the license count is desired. Pass 0 for a count of all licenses, 1 for a count of Report Viewer licenses, and 2 for a count of Report Designer licenses.

Return Value
The number of licenses activated for the specified license type.

This simple example displays the total number of licenses available.

Visual FoxPro

lparameters toApplication as SQApplication
local lnLicenses
lnLicenses = toApplication.Users.GetLicenseCount(0)
messagebox('There are ' + transform(lnLicenses) + ' licenses.')


function Main(Application)
Licenses = Application.Users.GetLicenseCount(0)
msgbox "There are " + cstr(Licenses) + " licenses."
end function


function Main(Application) {
var Licenses
Licenses = Application.Users.GetLicenseCount(0) ;


public static void ShowLicenses()
  int licenses = sfqApplication.Users.GetLicenseCount(0);
  MessageBox.Show("There are " + licenses.ToString() + " licenses.");


public shared function ShowLicenses() as Boolean
  licenses As Integer = sfqApplication.Users.GetLicenseCount(0)
  MessageBox.Show("There are " + licenses.ToString() + " licenses.")
End Function

See also

Users Collection

© Stonefield Software Inc., 2018 • Updated: 06/06/16
Comment or report problem with topic