how to verify number of Crystal Report license sessions

Posted on 2012-04-10
Last Modified: 2013-05-21

I need to monitor the current number of Crystal report (licensed )
session via a script & if this number of session hit 17, I'll restart
(using another script, see further below) Crystal report services.

Increasing the Crystal licence is not an option.

Anyone knows what's the TCP destination port number when a
user runs Crystal report generation?

Our licence is 18 & when this limit of concurrent sessions is hit,
users' report generation will fail (though I've never been able
to get from the users what's the error message)

From the config file below, I noticed that the executable utility
crystalLicenseMonitor.exe could do this but this utility runs only
once every 5-10 minutes & is quite slow to report.

On Crystal Management console (browser-based), I would click
"Home", Metrics & see "Concurrent Logged On" to verify this
& I suppose this is reported by crystalLicenseMonitor.exe.

Is there any way to check this at Windows command prompt, say,
using "netstat -an | find/i "TCP_port#" or any other commands
(say 'sc queryex' or the likes)?

<?xml version="1.0" encoding="utf-8" ?>
    <add key ="Institutions" value="DC1 and DC2" />  
    <add key ="Interval" value="300000" />  <!--Time interval is 5 mins,300000-->
    <add key ="SMSSwitch" value="8"/>
    <add key ="ServiceSwitch" value="100"/>
    <add key ="SMSContent" value=">=8"/>
    <add key ="LOG_FILE_DIR" value="D:\SCN\SSS_MonitorCrystalLicense_DC2\bin" />
    <!-- Crystal Enterprise Logon -->
    <add key="CE_SERVERNAME" value="SSSDC2prn001" />
    <add key="CE_ADMIN_USERNAME" value="Administrator" />
    <add key="CE_ADMIN_PASSWORD" value="passwordXX" />
    <add key="CE_AUTHENTICATION_TYPE" value="secEnterprise" />

    <add key="SMS" value="True"/>
    <!--add key="SMSNumber" value="99998888:99998887:99998886:99998885" -->
    <add key="SMSNumber" value="99998888:99998887:99998886:99998885:98989898:90008989" />
    <add key="SMSPort" value ="COM1" />    
      <!-- This section defines the logging configuration for My.Application.Log -->
      <source name="DefaultSource" switchName="DefaultSwitch">
          <add name="FileLog"/>
          <!-- Uncomment the below section to write to the Application Event Log -->
          <!--<add name="EventLog"/>-->
      <add name="DefaultSwitch" value="Information" />
      <add name="FileLog"
           type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=,

Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
      <!-- Uncomment the below section and replace APPLICATION_NAME with the name of your application to write to

the Application Event Log -->
      <!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener"

initializeData="APPLICATION_NAME"/> -->

======== script to restart if # of Crystal sessions hit 17 ============
REM netstat -ano | find/i "9180" | find/i ":4568" | find/V "ESTAB"
if 'number_of_sessions >= 17' then
sc stop "CacheServer" = Crystal Cache Server
sc stop "CrystalMS" = Crystal Management Server : stop 1st
sc stop "CrystalInputFileServer" - skip as takes too long to restart
sc stop "CrystalOutputFileServer" - skip as takes too long
sc stop "JobServer_Report" - Cryst Rp Job Svr : this is the licence session?
sc stop "pageserver" = Crystal Page Svr
sc stop "WebCompServer" = Cryst Web Component Svr
sc start "all the above in any sequence"

We don't really have that many users logged on, just that we believe
some sessions were not dropped, resulting in the licence utilized
exceeding the licensed limit.  

Any suggestions are most welcome
Question by:sunhux
  • 3
  • 2

Author Comment

ID: 37827552
I also found that there's a screen to detect the cms port# to get the
number of sessions as given below but somehow Tcp 6400 doesn't
appear to be the port used in our environment's Crystal report:
LVL 100

Assisted Solution

mlmcc earned 500 total points
ID: 37828795
How did you arrive at 18 as the limit?

Licenses and connections are usually bundled in groups of 5.

It would be better to figure out why connections are not being released.


Author Comment

ID: 37830750
I'm not familiar with Crystal report & just joined that team &
was told that when the concurrent licence sessions hit 18, users
can't generate reports.

Ok, I will appreciate if you can provide a fix to solve or if this is
not possible, then the next best option is to monitor the # of
sessions & restart those services.  Any idea?
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

LVL 100

Accepted Solution

mlmcc earned 500 total points
ID: 37830966
WHat tools are you using to run the reports?

Did your team write the applications or do you have commercial report viewing tools?
If commercial which ones?

I am aware of tools that only use a session or connection for as long as it takes to read the data and then the session or connection is freed.


Author Comment

ID: 37838278
I'll go down to the site tomorrow to find out what's that
tool but I recall it's just a browser session which I login
to some sort of Crystal report management page

I'll get the html source code of that page : maybe it
will help & give a clue on how it obtain the number of
licenced sessions

Expert Comment

ID: 39185375
mlmcc is correct. Concurrent licenses are sold in batches of 5 as far as I know. We have a web page to monitor licenses on each of our web servers.

Response.ExpiresAbsolute = now()-1
dim oApp
dim nLicensed
dim nActive
dim bIsActive
Set oApp = Server.CreateObject("CrystalRuntime.Application")
bIsActive = oApp.GetLicenseStatus (nLicensed, nActive)
set oApp = nothing

Function GetNLicensed
if nLicensed = 2147483647 then
      GetNLicensed = "Unlimited"
      GetNLicensed = nLicensed
end if
end function

Function GetNActive
if bIsActive = True then
      GetNActive = nActive-1
      GetNActive = nActive
end if
end function


<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE>RDC Runtime License Status</TITLE>
<P align=center><STRONG><FONT size=4 face="Courier New">RDC Runtime License Status
</FONT></STRONG>     </P>
<TABLE align=center border=1 borderColor=blue cellPadding=1 cellSpacing=1
    <TD align=middle><FONT face="Courier New"
      size=2><STRONG>Server Activity</STRONG></FONT></TD>
    <TD align=middle><FONT face="Courier New"
    <TD align=middle><FONT face="Courier New"
    <TD align=middle><FONT face="Courier New"
      size=2><STRONG>Concurrent Users</STRONG></FONT></TD>
    <TD align=middle><FONT face="Courier New"
      size=2 color=red><%=GetNLicensed%></TD>
    <TD align=middle><FONT face="Courier New"
      size=2 color=red><%=GetNActive%></TD></TR></TABLE>

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through setting up a JasperReports Server using the AWS EC2 instance, and this article will cover some basic administration tasks I had to perform.
Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question