Link to home
Start Free TrialLog in
Avatar of meharmahmood
meharmahmood

asked on

Is it possible to send dataset,datatable directly to crystal report

It will apprecaite if someone can tell how i can pass, dataset or dataview or a datatable to crystal report directly.  I m having one calculated table on my form. i want to print that table data through crystal report. So how is it possible to send that table to crystal report directly instead of saving on server and then crystal report fetch data from server.
thanks in advance
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ahmadfuwad
ahmadfuwad

'this is the right way for showing data in crystal report and dataset or datagrid cant sent to
'report directly


  cn.ConnectionString = "Server=eteam08;Database=dbTestGrid;user id=sa;password=imran"
        cn.Open()


        cmd1.Connection = cn
        cmd1.CommandType = CommandType.Text
        cmd1.CommandText = "select * from tblCustomer"
        oda1.SelectCommand = cmd1
        oda1.Fill(ods, "Customer")

        Dim rpt As New CrystalReport1
        rpt.SetDataSource(ods.Tables("Customer"))
        CrystalReportViewer1.ReportSource = rpt
Points to emoreau