how to using stored procedure to pass parameter in cr?

zouky

Newcomer
Joined
Nov 8, 2004
Messages
1
dear expert

i write a stored procedure for fetching a particular field on my database which look like this:

USE moneylendersystem
go
CREATE PROCEDURE [dbo].[TOC_Branch_Address]
@BID VARCHAR (50)
as
select Branch_Address
from S_TOC_Branch S
where S.Branch_ID = @BID
GO

the application is like this: everytime the branch login, they will own their unique branch ID, then now i want to use the SP to fetch the address and pass the value print at my report header.

the problem i faced now is : how to pass the branch id using data adapter to my report (@BID)?

i using data adapter for this

daAddress.SelectCommand.CommandText = "TOC_Branch_Address" ;
daAddress.selectCommand.CommandType = CommandType.StoredProcedure;

so, i assume it will fetch my banch address according to @BID, so now how to move to the crystal report??

am i in the right path or what? please show me some hint on it. i need to know what should adding at the codebehind of .aspx by calling the crystalreportview to show my report.

thank you
 
Back
Top