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!

Passing parameters from ASP - Stored Procedure - Crystal Reports

Status
Not open for further replies.

Jayson

Programmer
Jan 31, 2001
75
US
I am trying to pass parameters from my ASP pages using a <FORM> tag to SQL stored procedure, then somehow use the same stored procedure and parameter values to output onto Crystal Reports 7 Web Report server. Is this possible?

All Crystal Reports files are being created using Crystal Reports 5.0 but the Web Server runs Crystal Reports 7. Is this a potential problem?

Thanks!
 
No reason why it shouldn't (never used Crystal but data is data)...Are you using the command object to call the sp? After executing the command object just read the parameters from the command object into your cr web report..
--------------------------
Dim dbConn, cmd
-----
Set dbConn = Server.CreateObject(&quot;ADODB.Connection&quot;)
dbConn.Open &quot;DRIVER=SQL Server;SERVER=****;DATABASE=****;Regional=Yes;UID=****;PWD=****&quot;
dbConn.CommandTimeout = 120
Set cmd = Server.CreateObject(&quot;ADODB.Command&quot;)
cmd.ActiveConnection = dbConn
cmd.CommandType = adCmdStoredProc
'
cmd.CommandText = &quot;<sp name>&quot;
cmd.Parameters.Append cmd.CreateParameter(&quot;ReturnCode&quot;, adInteger, adParamReturnValue)
REST OF PARAMETERS

cmd.Execute (if more than one value is returned open into recordset)

*** SEE ALL PARAMS (don't forget to dim param first)****
for each param in cmd.parameters
Response.Write param.name &amp; &quot; - &quot; &amp; param
next

******************************

you still have all the values until you Set cmd = Nothing

Hope this helps
Dave
adf999@hotmail.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top