Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7929391
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:03:43+00:00 2026-06-03T20:03:43+00:00

I have a windows form that I am using a microsoftreportviewer on and I

  • 0

I have a windows form that I am using a microsoftreportviewer on and I can do this sucessfully with one dataset. Suppose I have tables table1,table2, and table3, how would I add all of these to the reportviewer programatically on ReportViewer_Load? Thanks!

Note: All these tables have DIFFERENT columns

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T20:03:44+00:00Added an answer on June 3, 2026 at 8:03 pm

    Do you want to select any one by their name at a time and then bind it to report ? If that’s what you are looking for then the code below might help you :

    private DataTable GetData(string tableName)
        {
            DataSet ds = new DataSet();
            string query = "Select * from something";
            OdbcDataAdapter da = new OdbcDataAdapter(query, conn);
            da.Fill(ds);
            DataTable dt = ds.Tables[tableName];
            return dt;
        }
    //You can fill the dataset once and then just get the table by table name. No necessary that you have to fill the dataset every time to get tables 
    
        private void RunReportViewer()
        {
            this.ReportViewer1.Reset();
            this.ReportViewer1.LocalReport.ReportPath = Server.MapPath("Report.rdlc");
            ReportDataSource rds = new ReportDataSource("#_your_table_Name", GetData());
            this.ReportViewer1.LocalReport.DataSources.Clear();
            this.ReportViewer1.LocalReport.DataSources.Add(rds);
            this.ReportViewer1.DataBind();
            this.ReportViewer1.LocalReport.Refresh();
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using windows application and I have four combo boxes(comboeventname,combosendtype,comboType,comboschedule) in that form....
This is the situation. I have a windows form app that uses an access
I have a C# Windows Form application that contains a menu with this event:
I have a Windows form that's generated using code (including buttons and what not).
I have a simple Windows Form application that is using the .net 3.5 compact
I have a program where I am using windows form, in that form I
I have created a Windows form using Visual C# - this contains a rich
I have a Windows Form that takes quite a bit of time to load
I have a windows form that has two DataGridViews (DGVs) that will hold 25,000+
I have a windows form application that uses a Shared class to house all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.