Am Getting Some Error with Crystal Report

Posted by Cibin under Visual Studio on 5/12/2013 | Points: 10 | Views : 842 | Status : [Member] | Replies : 3
Hi,

I am using visual Studio 2010, i want transfer the values from data grid view to Crystal Report,,, Can Anyone help me out,,, Thanks in Advance...


This is My Code

Dim str As String = "SELECT * FROM postpaid WHERE Division='" & ComboBox1.Text & "'"

Dim dr As OleDb.OleDbDataReader
Dim dt As New DataTable
Dim ds As New DataSet
Dim cmd As New OleDb.OleDbCommand(str, myOleDbConnection)
myOleDbConnection.Open()
dr = cmd.ExecuteReader()
dt.Load(dr)
DataGridView1.DataSource = dt

ds.Tables.Add(dt)
Dim cos As New CrystalReport11()
cos.SetDataSource(ds)
CrystalReportViewer1.ReportSource = cos

myOleDbConnection.Close()




Responses

Posted by: Raj.Trivedi on: 5/12/2013 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hello cibin

check this

http://www.dummies.com/how-to/content/creating-a-report-with-crystal-reports-10.html

Regard's
Raj.Trivedi
"Sharing is Caring"
Please mark as answer if your Query is resolved

Cibin, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Cibin on: 5/13/2013 [Member] Starter | Points: 25

Up
0
Down



Hello,

I have a dataset ds , and a table dt ,,, i want to load crystal report with this dt and ds ,, Can anyone help me out by a step by step process

My Code,,,
dt = DataGridView1.DataSource
ds.Tables.Add(dt)
Dim cos As New CrystalReport12
cos.SetDataSource(ds)

CrystalReportViewer1.ReportSource = cos

Thanks in Advance

Cibin, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rimi1289 on: 5/13/2013 [Member] Starter | Points: 25

Up
0
Down
Its not clear, what is the error you are getting. Meanwhile see this.

http://www.encodedna.com/2012/11/crystalreport-aspdotnet-xml-reporting.htm

Cibin, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response