Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


how to verify number of Crystal Report license sessions

Posted on 2012-04-10
Medium Priority
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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 101

Assisted Solution

mlmcc earned 1500 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?
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

LVL 101

Accepted Solution

mlmcc earned 1500 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

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

INTRODUCTION The purpose of this document is to demonstrate the Installation and configuration of the Data Protection Manager product. Note that this demonstration was prepared on the basis of Windows OS is 2008 R2 and DPM 2010. DATA PROTECTI…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

604 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