hello all
i have 1 table feld having no ,name
i have one textbox when i input name it should return me according to name (input) i gave
and in report i have Inserted both field (no ,name) while it is being asked while i added it from new Item
Problem is This code shows all record in table and i can not see any Parameter in with TICK sign even if i put it on as a new parameter in field Explorer.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Not IsPostBack Then
Dim crpt As New cr1 (crytal report object )
Dim cn As New SqlConnection("workstation id=JIG;packet size=4096;integrated security=SSPI;data source=jig;persist security info=False;initial catalog=xx")
Dim cmd As New SqlCommand("sp1", cn)
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.Add("@p1", txt1.Text)
Dim da As New SqlDataAdapter(cmd)
da.Fill(ds)
crpt.SetDataSource(ds)
crw.ReportSource = crpt (crystal report viewer object)
End If
my Sp1 is
ALTER PROCEDURE
dbo.sp1
@p1 varchar
AS
select * from tbl Where name='@p1'
RETURN
pls help me ......
