Dear Frens,

I m beginner in VB.net.

I have developed an Address Management System where I want to add my searched grid into Crystal Report.
Unfortunately, I don't know code to make report from datagrid. or certain data set. I have succeeded in making report from primary dataset from crystal report by designining manually.

So, please help me make report from data grid searched . I would be very grateful if u help me.

my code for datagrid is as follows;

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Db1DataSet1.Clear()
        Dim conStr As String = "Provider=Microsoft.JET.OLEDB.4.0;data source=K:\Database\db1.mdb"
        Dim con As OleDb.OleDbConnection = New OleDb.OleDbConnection(conStr)
        Dim S As String
        Dim datagrid1 As New DataGrid
        S = "select * from add1 where lname='" & TextBox1.Text & "'"
        Dim da As OleDb.OleDbDataAdapter = New OleDb.OleDbDataAdapter(S, con)
        da.Fill(Db1DataSet1, "add1")
        datagrid1.DataSource = Db1DataSet1.DefaultViewManager

    End Sub

I want to add following data grid into crystal report viewer. but I don't know the code

Please help

Anticipating the help

Sincerly

Kshiteesh

you want to display it self on the report view or the data in the grid . If u wan tthe data then u need to dynamically frame the query at runtime.

I want to display it according to my designof report in the reportview. So please tell me how can I dynamically frame the query at runtime??

thanks n anticipating...

regards
Kshiteesh

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.