Hi,

In the project I am developing, I wish to show entries from the database as a Crystal Report.

I have done the following to set this up:

1>Created a form called rpt.vb and put a Crystal Report Viewer on it called CrystalReportViewer1

2>Created a Button with the following code:

Public Class rpt

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim cryRpt As New ReportDocument
        cryRpt.Load("C:\Users\Harsh\Documents\Visual Studio 2008\Projects\PROJECT\PROJECT\CrystalReport1.rpt")
        CrystalReportViewer1.ReportSource = cryRpt
        CrystalReportViewer1.Refresh()

    End Sub
End Class

3>Created a Crystal Report called CrystalReport1

My problem is, that when the button is clicked on the rpt.vb form, it loads the Report properly, but only shows me the column names in the report and not the data under them. Also, attaching an image of the problem for better view.

Can someone please show me how to get the Rows in the report properly?

Thank You in advance

Search the form before posting you get lots off post on this topic on daniweb

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.