I want to print the data after saving but it shows this error " Invalid File Path"
Please check the below mentioned code and solve my problem
Dim insql As String = "INSERT INTO patient (recptno,pname,age,address,date,phone,refby,testcode,testname,amount) VALUES (@number1,@text2,@number3,@text4,@text5,@number6,@text7,@text8,@text9,@number10)"
cmd = New SqlCommand(insql, sqlconn)
cmd.Parameters.AddWithValue("@number1", reciepttxt.Text)
cmd.Parameters.AddWithValue("@text2", nametxt.Text)
cmd.Parameters.AddWithValue("@number3", agetxt.Text)
cmd.Parameters.AddWithValue("@text4", addresstxt.Text)
cmd.Parameters.AddWithValue("@text5", datetxt.Text)
cmd.Parameters.AddWithValue("@number6", phonetxt.Text)
cmd.Parameters.AddWithValue("@text7", refbytxt.Text)
cmd.Parameters.AddWithValue("@text8", testcodetxt.Text)
cmd.Parameters.AddWithValue("@text9", testnametxt.Text)
cmd.Parameters.AddWithValue("@number10", amounttxt.Text)
sqlconn.Open()
rowsins = cmd.ExecuteNonQuery
sqlconn.Close()
MessageBox.Show(rowsins.ToString & " row added")
Dim rptDoc As New ReportDocument
Dim ds As New MDataSet
Dim sqlCon As SqlConnection
Dim dt As New DataTable
dt.TableName = "Crystal Report Example"
sqlCon = New SqlConnection("Data Source=.\SQLEXPRESS;Initial Catalog=blissdata;Integrated Security=True")
Dim da As New SqlDataAdapter("SELECT recptno,pname,age,address,date,phone,refby,testcode,testname,amount FROM patient", sqlCon)
da.Fill(dt)
ds.Tables(0).Merge(dt)
rptDoc.Load(Server.MapPath("CrystalReport1.rpt"))
rptDoc.SetDataSource(ds)
CrystalReportViewer1.ReportSource = rptDoc