vb.net / Report rdlc ?

using vb.net, and it seems the report viewer has changed. Now I create a new item, a Report.rdlc and I don't see how I can select a Datasource. Can someone tell me how to do this?
thanks
LVL 1
Jess31Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
puffdaddy411Connect With a Mentor Commented:
Ok.  You need to add a datasource to your localreport.  If you have custom tables generated in code, they can be used as well with a bit of trickery.  The following is for designer handled tables or query results.

ReportViewer1.LocalReport.DataSources.Add(New Microsoft.Reporting.WinForms.ReportDataSource("MyDataSet", Table))

I believe this line is what you need.
Dim DS As New MyDataSetTableAdapters.MyTableAdapter
        Dim Table As New MyDataSet.MyDataTable

        Table = DS.GetDataBy  'Or whatever your query method is named.


        Me.ReportViewer1.LocalReport.DataSources.Add(New Microsoft.Reporting.WinForms.ReportDataSource("MyDataSet", Table))

       'This is for locally saved reports.
        Me.ReportViewer1.LocalReport.ReportPath = YourPath & "Report1.rdlc"
        Me.ReportViewer1.RefreshReport()

Open in new window

0
 
EYoungCommented:
When you add the ReportViewer control to your project, it will prompt you for the datasource.
0
 
puffdaddy411Commented:
Where is your data?  Do you use the Dataset designer and use tableadapters to pull in data?  OR...do you have code-generated tables in memory?
0
 
Jess31Author Commented:
I am trying with the Dataset Designer otherwise it seems to be very difficult to design the report.
0
All Courses

From novice to tech pro — start learning today.