locked
Two different tables data in one report RRS feed

  • Question

  • Hi Gurus,

    I need to show data from 2 different tables in a report in SSRS. These table does not have any relationship between them.

    If I use two different datasets, the second dataset should have some aggregate function or atlease "First" or last. Even users dont want to go for Sub reports.

    Kindly help me to resolve this issue. Your valuable responses would be greatly appreciated.

    Thansk, Sengwa

     

    Thursday, May 13, 2010 4:08 PM

Answers

  • Sometimes using a subreport is the best way to federate data from different data sources but there are other options, depending on your requirements.

    When you say there are no relationships between the tables, you can still join records in a query for tables in different databases on the same server or by using a linked server object defined in SQL Server.  If the data is not related, you can place different data regions on a single report.

    Where do these two tables reside?

    How is this the data related (assuming that it is)?


    Paul Turley, MVP [Hitachi Consulting] SQLServerBIBlog.com
    • Proposed as answer by Kalman Toth Saturday, May 15, 2010 3:07 PM
    • Marked as answer by Challen Fu Tuesday, May 18, 2010 5:04 AM
    Thursday, May 13, 2010 6:51 PM

All replies

  • Sometimes using a subreport is the best way to federate data from different data sources but there are other options, depending on your requirements.

    When you say there are no relationships between the tables, you can still join records in a query for tables in different databases on the same server or by using a linked server object defined in SQL Server.  If the data is not related, you can place different data regions on a single report.

    Where do these two tables reside?

    How is this the data related (assuming that it is)?


    Paul Turley, MVP [Hitachi Consulting] SQLServerBIBlog.com
    • Proposed as answer by Kalman Toth Saturday, May 15, 2010 3:07 PM
    • Marked as answer by Challen Fu Tuesday, May 18, 2010 5:04 AM
    Thursday, May 13, 2010 6:51 PM
  • As the tables have NO RELATIONSHIP and assuming that you want to show it in single tabular report, how bad will it be to cross join those tables (its really bad performancewise)  and get the data in single dataset.

    Thursday, May 13, 2010 8:23 PM
  • Assuming that you have two unrelated tables

    Table1: Col1, Col2, Col3

    Table2: ColA, ColB, ColC

    let us know how do you want to present the data in the report.

    Thsi will help us in trying to get an appropriate solution matching your requirement.

     

    Saturday, May 15, 2010 2:55 PM