locked
Using multiple tables in a dataset for a visual studio report RRS feed

  • Question

  • I am trying to create my data source for my report in Visual Studio 2010 and when I choose my dataset it only lets me pick one table for the dataset. Why can I not select multiple tables for my report dataset? I am trying to make a full report taking into account almost every table in my database and can not do it unless I can add multiple tables to my data set. 
    Thursday, June 14, 2012 7:16 PM

Answers

  • Hello Marv102,

    You are using the local report, which cannot fill the query string. However, you can add new dataset to the report, so that you can use all the datasets from the database. However, each dataset can bind one table or view from the database. Therefore, if you want to use all datasets, you have to create all of them. It is a huge task. In order to reduce the work, we recommend you create the views or stored procedure to merge some output of the datasets into one dataset.

    If you have any questions about this issue, please let me know.

    Regards,

    Edward


    Edward Zhu

    TechNet Community Support

    • Proposed as answer by Edward Zhu Tuesday, June 19, 2012 5:42 AM
    • Marked as answer by Elvis Long Wednesday, June 27, 2012 1:50 AM
    Monday, June 18, 2012 10:18 AM

All replies

  • If you goto the left part of the screen you can create new datasets.

    Within the dataset choose QUery and youcan build a query.

    Another way is to put a query into the database, by using a view or using stored procedures


    Business Intelligence professional

    Thursday, June 14, 2012 7:24 PM
  • right click on the dataset you have created (TakeHomeDataSet) and you will see a menu that has an option for query designer. Click query designer and a new window will open which will give you the ability to create  queries from multiple tables.

    This should help. Let me know if you have any questions


    • Edited by Gess Man Thursday, June 14, 2012 7:30 PM
    • Proposed as answer by Gess Man Thursday, June 14, 2012 7:30 PM
    • Unproposed as answer by Edward Zhu Tuesday, June 19, 2012 5:42 AM
    Thursday, June 14, 2012 7:29 PM
  • When I click on New>Dataset it brings me to the same menu that is on my screen shot. I don't see anything that says query. Am I clicking on the wrong spot?
    Thursday, June 14, 2012 7:30 PM
  • Do not click on new. Right click your existing dataset  (TakeHomeDataSet) and you will see the query editor on the list
    • Proposed as answer by Gess Man Thursday, June 14, 2012 7:32 PM
    • Unproposed as answer by Edward Zhu Tuesday, June 19, 2012 5:42 AM
    Thursday, June 14, 2012 7:32 PM
  • I don't see that menu item..

    • Edited by MARV102 Thursday, June 14, 2012 7:48 PM
    Thursday, June 14, 2012 7:37 PM
  • Hello Marv102,

    You are using the local report, which cannot fill the query string. However, you can add new dataset to the report, so that you can use all the datasets from the database. However, each dataset can bind one table or view from the database. Therefore, if you want to use all datasets, you have to create all of them. It is a huge task. In order to reduce the work, we recommend you create the views or stored procedure to merge some output of the datasets into one dataset.

    If you have any questions about this issue, please let me know.

    Regards,

    Edward


    Edward Zhu

    TechNet Community Support

    • Proposed as answer by Edward Zhu Tuesday, June 19, 2012 5:42 AM
    • Marked as answer by Elvis Long Wednesday, June 27, 2012 1:50 AM
    Monday, June 18, 2012 10:18 AM