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

Passing asp params to CR 8.5 without the parameter prompt popping up.

Status
Not open for further replies.

Tom45

Programmer
Oct 30, 2003
2
US
I have Crystal 8.5. I need to be able to get the asp page parameter to the CR report (which is using a MSSQL stored procedure with a parameter field) without the CReport popping up and prompting for the parameter. Is there a way to pass my asp variable directly to the backend stored proc without reentering the parameter value at the Report prompt?

Any help greatly appreciated.
 
You don't say how you are calling the CR Report...are you using the RDC or are you using CE/RAS?
 
Thanks for responding. I am using Crystal Enterprise 8.0 loaded on an MSSQL NT Server (4.0) I believe. The CR 8.5 reports are actually sitting on the same box, however the asp call I make to try to get the report to open is

reportstring = reportrooturl & reportname & "?" & "user0=sa&password0=sequel7&prompt0=" & myorderid & "&init=actx"

I was reading something about the "prompt0=" part of the url string has changed (?)

thanks.
 
Hi,
Try URL encoding the ampersand...Sometimes passing it unencoded causes problems.
Try:
amper = Server.UrlEncode("&")
reportstring = reportrooturl & reportname & "?" & "user0=sa" & amper & "password0=sequel7" & amper & "prompt0=" & myorderid & amper & "init=actx"

[profile]
 
Actually, you should be using the promptex-parmname syntax, rather than the prompt# syntax. Search the crystal website for ce8_urlcommands.pdf. This document explains how to create the url string for CE 8 and Crystal 8.5 reports.
 
Hi,
The prefered method is ( at least until v9, which seems to depricate it) the promptex-<yourparametername>.

I just wanted to show Tom45 how to test the existing URL with the ampersand encoded -
Both prompt types work but the later version is much easier to use since it does not rely on the order in which the parameters were created.

[profile]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top