Dim did As Integer Dim d_id As String = Request.QueryString("did") 'taking d_id value from another web page and convert it to integer did = Convert.ToInt32(d_id) MsgBox(did) Dim con As SqlConnection = New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True") con.Open() Dim cmd As SqlCommand = New SqlCommand("select * from t_donor where d_id=" & did & "", con) Dim ds As New DataSet() Dim da As SqlDataAdapter = New SqlDataAdapter(cmd) da.Fill(ds) Dim rptdocument As ReportDocument = New ReportDocument() rptdocument.Load(Server.MapPath("CrystalReport1.rpt")) rptdocument.SetDataSource(ds.Tables(0)) CrystalReportViewer1.ReportSource = rptdocument
myCrystalReprot.SetDatabaseLogon("myUsername", "myPassword");
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)