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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal 9 RAS license problem

Status
Not open for further replies.

kifaro

Programmer
Oct 4, 2002
54
US
I am fed up with Crystal!!! I am hoping someone else has a solution. Here is what I am experiencing: When I run my report like this the report remains in the queue, thereby taking up a license. If I kill the session("oClientDoc") object it regenerates the WHOLE report every time you switch page. This is Crystal 9 Advanced which is supposed to cache. Am I doing something wrong or is it not as advertised (BTW Crystal's tech support told me I couldn't do it, in otherwords only 3 people can look at reports at 1 time, I think they are smoking crack!!)

Thanks,
Aaron

<%

ReportName=RequesT(&quot;ReportName&quot;) & &quot;.rpt&quot;
Param1Val=request(&quot;param1&quot;)
Param1Type=request(&quot;param1Type&quot;)
Param2Val=request(&quot;param2&quot;)
Param2Type=request(&quot;param2Type&quot;)
Param3Val=request(&quot;param3&quot;)
Param3Type=request(&quot;param3Type&quot;)
Param4Val=request(&quot;param4&quot;)
Param4Type=request(&quot;param4Type&quot;)

if lcase(reportname)=&quot;cctvquote.rpt&quot; or lcase(reportname)=&quot;greenfolder.rpt&quot; then
set cn=createobject(&quot;adodb.connection&quot;)
set cmd=createobject(&quot;adodb.command&quot;)
set rs=createobject(&quot;adodb.recordset&quot;)
cn.Open session(&quot;connectionstring&quot;)
mysql=&quot;select status from proposal where id=&quot; & request(&quot;param1&quot;) & &quot; and revision=&quot; & request(&quot;param2&quot;)
rs.open mysql,cn,3,3

if cdbl(rs(&quot;status&quot;))<1 then
cmd.ActiveConnection=cn
cmd.CommandText=&quot;wsp_generate_proposal &quot; &_
&quot;@ProposalNum=&quot; & request(&quot;param1&quot;) &_
&quot;,@Revision=&quot; & request(&quot;param2&quot;)

cmd.Execute
end if
end if

Set oObjectFactory = CreateObject(&quot;CrystalReports.ObjectFactory.2&quot;)
Path = Request.ServerVariables(&quot;Path_Translated&quot;)
While (Right(Path, 1) <> &quot;\&quot; And Len(Path) <> 0)
iLen = Len(Path) - 1
Path = Left(Path, iLen)
Wend

Dim oReportLogons, oReportParameters

If Request.QueryString(&quot;pg&quot;) = &quot;1&quot; Then
'Create the ObjectFactory to instantiate Crystal Objects
Set ObjectFactory = CreateObject(&quot;CrystalReports.ObjectFactory.2&quot;)

'Create the ReportClientDocument
Set session(&quot;oClientDoc&quot;) = ObjectFactory.CreateObject(&quot;CrystalClientDoc.ReportClientDocument&quot;)

'Open the report.
session(&quot;oClientDoc&quot;).Open (&quot;rassdk://&quot; & path & reportname)


Set ReportParameters = session(&quot;oClientDoc&quot;).DataDefinition.ParameterFields
'Set oReportLogons = session(&quot;oClientDoc&quot;).DatabaseLogonInfos
session(&quot;oClientDoc&quot;).DatabaseController.Logon &quot;securityone&quot;, &quot;intranetonly&quot;

'DatabaseController.Logon userName, password
'For each logon in oReportLogons
' logon.UserName = &quot;securityone&quot;'
'logon.Password = &quot;intranetonly&quot;
'Next
key=1
For each parameter in ReportParameters

Set parameterField = parameter
paramName = parameterField.Name
parameterField.CurrentValues.RemoveAll

Dim paramValue, strValue
Set paramValue = CreateObject(&quot;CrystalReports.ParameterFieldDiscreteValue&quot;)
strValue = Trim(Request(&quot;param&quot; & key))

Select Case (parameterField.Type)
Case 6 ' Number value
if isNumeric(strValue) then
Dim longValue
longValue = CLng(strValue)
paramValue.Value = longValue
else
error = true
Exit For
end if
Case 9 ' Date value
if IsDate(strValue) then
Dim dateValue
dateValue = CDate(strValue)
paramValue.Value = dateValue
else
error = true
Exit For
end if
Case 11 'string value
paramValue.Value = strValue
Case Else
'not supported yet
End Select
' Add this value to current value list
parameterField.CurrentValues.Add paramValue
key=key+1
Next


End If

Set HTMLViewer = oObjectFactory.CreateObject(&quot;CrystalReports.CrystalReportInteractiveViewer&quot;)
With HTMLViewer
.ReportSource = session(&quot;oClientDoc&quot;).reportsource
.Name = &quot;Page&quot;
.isOwnPage = True
.isOwnForm = True
.HasHeaderArea=False
.IsDisplayGroupTree = False
.hasexportbutton=false
.isenabledrilldown=false

End With

response.write HTMLViewer.ProcessHttpRequest (Request, Response, Session)
%>
 
Crystal Advance is limited to 3 sessions. You need to purchase Crystal Report Application Server (RAS) for more connections
 
Crystal Advanced comes with RAS already. The only step from here is to buy the unlimited licenses for RAS for $25,000

Aaron
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top