Home All Groups Group Topic Archive Search About

crystalreport with sql select

Author
24 Aug 2006 2:50 PM
shif
Hi,
In asp.net I am trying to generate a crystal report by the method showing
below.But no data is showing in the report..for this what settings i have to
do in crystal report.
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim con As New SqlConnection(connectionString)
        Dim comd As New SqlCommand()
        comd.Connection = con
        comd.CommandText = "select  suppid,invno,amt from spfile where
suppid ='"&textbox1.text&"'
        con.Open()
        Dim adp As New SqlDataAdapter(comd)
        Dim dts As New DataSet()
        adp.Fill(dts)
        con.Close()
        Dim cr3 As New CrystalReport1()
        cr3.SetDataSource(dts)
        CrystalReportViewer1.ReportSource = cr3
        CrystalReportViewer1.DataBind()
        CrystalReportViewer1.Visible = True
End sub
--
Thanks

Author
24 Aug 2006 10:19 PM
Spam Catcher
=?Utf-8?B?c2hpZg==?= <ns_0***@hotmail.com> wrote in
news:F1BF9DB2-F424-4C24-BCCB-CB9294E75564@microsoft.com:

> In asp.net I am trying to generate a crystal report by the method
> showing below.But no data is showing in the report..for this what
> settings i have to do in crystal report.

did you design the template?