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

Passing storedprocedure parameters to report from vb or asp

Status
Not open for further replies.

rajyar

IS-IT--Management
Apr 11, 2001
8
US
Iam looking the code which shows passing of storedprocedure parameters to crystalreports using both vb and asp....
Please help me in advance..

thanks.....
 
Here's some ASP code:

' WORK WITH STORED PROCEDURE PARAMETERS

' - get the database's Stored Procedure Parameters
' Create a variable and point it to the Stored Procedure Parameter
' in the report

set StoredProcParamCollection = Session("oRpt").ParameterFields


' - get the specific Store Procedure Parameter
' Create a variable and point it to the specific stored procedure
' that we want to work on

Set ThisParam = StoredProcParamCollection.item(1)
Set ThisParam2 = StoredProcParamCollection.item(2)
Set ThisParam3 = StoredProcParamCollection.item(3)

' - save the new value to the Stored Proc Param
' Create a variable and store the new value for the Stored Procedure
' in it

NewParamValue = "10"
NewParamValue2 = "50"
NewParamValue3 = ("'"&a&"'")

' Save the new value for the Stored Procedure in the Store Procedure

ThisParam.SetCurrentValue cint(NewParamValue), 7
ThisParam2.SetCurrentValue cint(NewParamValue2), 7
ThisParam3.SetCurrentValue cstr(NewParamValue3), 12
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top