report

Hi Experts

i have datatable dt2 with fields
part
selling
I have report1.rdlc which has textBox1 and textBox2

how can I run report1 and bind data from dt2
part  in textBox1
and
selling  in textBox1

is that possible ?

Thanks
b001Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CodeCruiserCommented:
You would need to design the report using a dataset first and then populate it with datatable at runtime

http://msdn.microsoft.com/en-us/library/ms252094(v=vs.80).aspx
0
Alfredo Luis Torres SerranoASP .Net DeveloperCommented:
Create the report with a ghost dataset with the fields you want Then do somehitng like

StrSql = StrSql + "Señect .........")
ReportViewer1.Reset()
ReportViewer1.LocalReport.ReportEmbeddedResource = "WindowsApplication1.ReportName.rdlc"
Conn.Open()
adap1 = New System.Data.SqlClient.SqlDataAdapter(StrSql, Conn)
ds = New System.Data.DataSet()
adap1.Fill(ds, "Wherever")
Conn.Close()
ReportViewer1.LocalReport.DataSources.Clear()
Dim rs As Microsoft.Reporting.WinForms.ReportDataSource = Nothing
rs = New Microsoft.Reporting.WinForms.ReportDataSource("RerortDatasetGhostName", ds.Tables(0))
ReportViewer1.LocalReport.DataSources.Add(rs)
ReportViewer1.AutoSize = True
Me.ReportViewer1.RefreshReport()

Hope this help


0
Alfredo Luis Torres SerranoASP .Net DeveloperCommented:
Create the report with a ghost dataset with the fields you want Then do somehitng like

ReportViewer1.Reset()
ReportViewer1.LocalReport.ReportEmbeddedResource = "WindowsApplication1.ReportName.rdlc"
Conn.Open()
adap1 = New System.Data.SqlClient.SqlDataAdapter(YuorSelectQueryhere, Conn)
ds = New System.Data.DataSet()
adap1.Fill(ds, "Wherever")
Conn.Close()
ReportViewer1.LocalReport.DataSources.Clear()
Dim rs As Microsoft.Reporting.WinForms.ReportDataSource = Nothing
rs = New Microsoft.Reporting.WinForms.ReportDataSource("RerortDatasetGhostName", ds.Tables(0))
ReportViewer1.LocalReport.DataSources.Add(rs)
ReportViewer1.AutoSize = True
Me.ReportViewer1.RefreshReport()

Hope this help
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.