How to generate a crystal report at run time
Hi to all
I want to generate crystal report at run time through dataset filled by a query. can anyone tell me how can i generate it at runtime.
I hav done following coding but it produces a blank report.
Dim str As String
Dim cr As New Card
Dim da As New SqlDataAdapter
Dim cmd As New SqlCommand
Dim ds As New DataSet
str = "select RID,Name,Dob,Address,Phno,Mob,Email,Courseid from Studentdetails where RID= '" & txtrid.Text & "' "
cmd = New SqlCommand(str, con)
da.SelectCommand = cmd
da.Fill(ds)
cr.Load()
cr.SetDataSource(ds)
CrystalReportViewer1.ReportSource = cr
CrystalReportViewer1.DataBind()
Now what should i add so that filtered data displayed on report.
Plz answer if anyone can.
Thanks in advence
|