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

Crystal Reports 9 URL Functionalty

Status
Not open for further replies.

virtualjon

Technical User
Aug 6, 2003
12
GB
Hi,

I've been trawling through the posts on this forum (very useful!) as we've been having a problem using the URL functionality. Before I begin, we have:

Crystal Reports 9, Developer Edition and the packaged version of Crystal Report Application Server 9.

We currently have no problem displaying report in our web application using the a modified version of pageViewer.asp

However, we would like to use the URL functionality to be able to pass parameters to the reports. When we try and do this, it appears that CRAS is missing various components.

Can anyone answer whether this can be done with the version that we currently have?

Will we have to upgrade to Crystal Reports (Advanced), or will we need to go to Crystal Enterprise 9? Or is this all possible with a little tweak of our current version?!

Many thanks in advance!

Jon
 
If I remember correclty, RAS is a variant of the complete CE system. Doesn't it use the same basic architecture (Page Server, Job Server, etc.,) as CE? I can't really test your exact scenario, but have you tried stopping and restarting your RAS system (the RAS Server and any other servers, like the Job Server and Page Server) after installing the UFL? And does the UFL work in CR 9 apart from RAS?
 
Ok, the good news it that we've managed to get it working. Just in case, I'll post the code below. It is in our modified report.asp file. Probably the first three lines you'll be interested in.

This was done using the RAS9 as delivered for Crystal Reports:

if Request.QueryString(&quot;Params&quot;) <> &quot;&quot; then
set Param = objectFactory.CreateObject(&quot;CrystalReports.ParameterField&quot;)
set ParamValue = objectFactory.CreateObject(&quot;CrystalReports.ParameterFieldDiscreteValue&quot;)
Set clientDoc = objectFactory.CreateObject(&quot;CrystalClientDoc.ReportClientDocument&quot;)

clientDoc.Open ReportName, 0

count = 0

URL = URL & &quot;&Params=&quot;

ArrayParams = Split( Params , &quot;,&quot; )

For Each ParamValue in ArrayParams

URL = URL & ParamValue & &quot;,&quot;

clientDoc.DataDefinition.ParameterFields( count ).copyto Param
Param.CurrentValues.Add ParamValue

clientDoc.DataDefController.ParameterFieldController.modify count,Param

count = count + 1

Next

viewer.ReportSource = clientDoc.ReportSource
else
viewer.ReportSource = ReportName
end if
 
Ooops...sorry about the reference to UFL. I shouldn't try to answer questions before my first cup of coffee. Or perhpas I need new glasses. Your code looks good. Thanks for the update.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top