Solved

vb.net / Report rdlc ?

Posted on 2011-02-16
5
844 Views
Last Modified: 2012-05-11
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
0
Comment
Question by:Jess31
5 Comments
 
LVL 7

Expert Comment

by:EYoung
ID: 34910695
When you add the ReportViewer control to your project, it will prompt you for the datasource.
0
 
LVL 1

Expert Comment

by:zxc3735
ID: 34914792
0
 
LVL 5

Expert Comment

by:puffdaddy411
ID: 34943537
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
 

Author Comment

by:Jess31
ID: 34948703
I am trying with the Dataset Designer otherwise it seems to be very difficult to design the report.
0
 
LVL 5

Accepted Solution

by:
puffdaddy411 earned 500 total points
ID: 34953187
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

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Modal Popup Extender control 1 18
VB.net Open Folder in Windows Explorer 3 29
export data table to excel in vb.net 10 24
Sql server, import complete table, using vb.net 9 33
Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question