Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Concurrent Access License error and not using ASP! 3

Status
Not open for further replies.

mikebjr

MIS
Oct 13, 2003
2
US
I'm not sure how long it has been going on, but several of our users are experiencing this error when attemting to view reports from our database app.

"There are not enough Concurrent Access Licenses to log you on. This system has 5 Concurrent Access Licenses. Please try again later, or contact your system administrator to obtain more licenses. Licenses can be purchased direct from Seagate Software or through the Seagate Software Online Store."

Our dev team creates the reports using Crystal Reports 8.5 and we save the reports to a server share. Our VB database front end uses the distributable Crystal Reports Viewer control (crviewer.dll) to display the reports from within the app. We do not use ASP, which according to Crystaldecisions.com's knowledge base, is the sourse of this error.

If anyone has any insight on this, please help me out. If you need more information, please do not hesitate to ask.

Regards,
Mike
 
Well, every methodology for distributing Crystal in a shared environment has a license limitation. And 5 users is the out-of-the-box limit. Crviewer.dll is simply the viewer that receives the report. Something else has to generate it, and in your situation, I would assume it is CRAXDRT.dll, which must also be sitting on the server for you to get that error. And CRAXDRT.DLL has a 5 user limit. You could get around that by distributing CRAXDRT.dll (and the other runtime required files) to the client and having the client generate the report rather than the server (which would obviously require a change in your application's architecture). In that scenario, you would not run into any limits, unless the client opened up 5 processes that each took a license on his or her pc (not likely). The RDC (i.e., CRAXDRT) is really intended to be distributed to clients in a vb application.

Alternatively, you could, indeed, buy more licenses and keep your architecture the way it is.
 
What you say sounds about right. However, the CRAXDRT.dll that you speak of is indeed distributed to each of our clients' machines.

It seems that the users that generate the most reports (potentially 5+ in a short period of time) are the ones reporting the errors. When one of our guys is releasing a job, he may be viewing and printing several reports in rapid succession - Estimated Hours Report, Accounting Sheet, Customer Supplied Materials listing, Work Order Bill of Materials, Quoted Bill of Materials and so forth. Its not like the guy is trying to look at more that 5 reports simultaneously, he's just openging and printing them in sometimes rapid succession - Open Report 1, Review Briefly, Print, Open Report 2, Review Briefly, Print, etc.

Is there any way that you know of to tweak the timeout period on the users' machines to get around this issue? I would imagine that being able to lower the amount of time that the "connection" is open for the report would remedy the situation. I can't think of how to go about this, considering that the clients only have the .dlls on their machines (crax and crviewer, in particular).
 
This is very strange behavior on the part of the RDC (CRAXDRT), because I've seen plenty of scenarios where people print multiple reports in a batch sequence or even preview multiple reports simultaneously in viewers without any licensing issues. In fact, I have a batch printing utility that is often used to print 20 to 30 reports sequentially, as fast as the system will generate them, and I've yet to hear or see of such behavior.

I don't believe there is any "timeout" setting. You hold a license by having a report object open. So...

You might want to try any/all of the following:

1) Make sure the vb app is destroying the report object after each print job (Set Report = Nothing). In the ASP world, this is what is done to release a license.

2) Verify which CRAXDRT.DLL is being used with the app. You can do this, I'm sure, several ways, but the method I prefer is to use the modules.exe utility (available at the Crystal KB as modules.zip) to view the dll's open for a single process. You can use the details view to see the file location and version number.

3) The following vb code is based on the crystal asp page license_info.asp and would obtain the license count in an ASP environment (it did nothing in my vb environment--that is, it didn't show any licenses being used--but if your vb environment is behaving like ASP, maybe you'll see something. This code is itself a bit unusual in that you can't type the object variables that will hold the Crystal Application and Report Objects. And the GetLicenseStatus method is undocumented. The first code belongs in a form that displays a "Preview" button The second set code belongs in the form that holds the CRViewer. There is also a label control at the top of this form to display the message generated in the code. This was tested in CR 9.

Form 1 (Startup form)
---------------------------

Option Explicit
Public crApp 'As CRAXDRT.Application
Public crRpt 'As CRAXDRT.Report

Private Sub cmdPreview_Click()
Dim frm As New crViewer

frm.Show

End Sub

Private Sub Form_Load()

Set crApp = CreateObject("CrystalRuntime.Application")

Set crRpt = crApp.OpenReport("C:\Appsdata\Crystal\CustomerOrdersWithComments.rpt")




End Sub


Form CRViewer:
------------------

Option Explicit

Private Sub Form_Load()
Dim nLicensed As Variant
Dim nActive As Variant

Dim blnResult As Variant
Dim strMsgActive As String
Dim strMsgLicensed As String
Dim strMsg As String

CRViewer91.ReportSource = Form1.crRpt
CRViewer91.ViewReport
Me.WindowState = 2

blnResult = Form1.crApp.GetLicenseStatus(nLicensed, nActive)

If blnResult = True Then
strMsgActive = CStr(nActive - 1)
Else
strMsgActive = CStr(nActive)
End If

strMsgLicensed = CStr(nLicensed)

Label1.Caption = strMsgActive & " License(s) of " & strMsgLicensed & " licenses used."

End Sub

Private Sub Form_Resize()

With CRViewer91
.Top = 500
.Left = 0
.Width = ScaleWidth
.Height = ScaleHeight
End With
End Sub

---------------

I really suspect the issue involves something odd with either the user's environment or with the way the app is using CRAXDRT. If none of this helps, would it be possible for you to post the code related to the printing of the reports?
 
It sounds like you a creating a new CRAXDRT.Application for each report. Just create one instance of the application and add each report to it. eg

Code:
Private crProj as CRAXDRT.Application

Private Sub InitializeReport()
  Set crProj = new CRAXDRT.Application
  
  for i = 0 to X
    RunReport(i)
  next
End sub

Private Sub RunReport(i as integer)
  Dim crReport as CRAXDRT.Report
  Set crReport = new CRAXDRT.Report

  crReport = crProj.OpenReport("myreport" & i & ".rpt")

  etc,etc

End Sub
[\code]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top