HI All
I have made a crysta report in asp.net using vb language in visual studio
2005.
for this i used following code.
i used following namespace at the top of the page
Imports CrystalDecisions.Shared
Protected Sub btnShow_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnShow.Click
Dim ConnInfo As New ConnectionInfo
With ConnInfo
.ServerName = "CAYMET-D10065D1"
.DatabaseName = "master"
.UserID = "sa"
.Password = "bharti"
End With
Me.CrystalReportViewer1.ParameterFieldInfo.Clear()
If Me.txtEmployeeID.Text.Trim.Length > 0 Then
Me.CrystalReportViewer1.ReportSource =
Server.MapPath("CrystalReport1.rpt")
Dim ParamFields As ParameterFields =
Me.CrystalReportViewer1.ParameterFieldInfo
Dim p_EmpID As New ParameterField
p_EmpID.Name = "emp_id"
Dim p_EmpID_Value As New ParameterDiscreteValue
p_EmpID_Value.Value = Me.txtEmployeeID.Text
p_EmpID.CurrentValues.Add(p_EmpID_Value)
ParamFields.Add(p_EmpID)
Else
' Me.CrystalReportViewer1.ReportSource =
Server.MapPath("CrystalReport1.rpt")
End If
For Each cnInfo As TableLogOnInfo In
Me.CrystalReportViewer1.LogOnInfo
cnInfo.ConnectionInfo = ConnInfo
Next
Me.CrystalReportViewer1.RefreshReport()
End Sub
now i want to implement this in same asp.net but csharp language.
how to implement the above code in button click event