CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2006
    Posts
    197

    How to make a report with multiple datasources?

    Im designing a report with reporting services (not crystal) I add a table drag some fields to that table and that works great, now I need to add another table component and drag fields from another query (in the same dataset).
    When I try to test it it says:
    A data source instance has not been spplied for the data source Dataset1_SP1 (this is the second query).
    Is there a way to do this?
    I need to list first elements from one query and then from another.
    Thanks!

  2. #2
    Join Date
    Jan 2006
    Posts
    197

    Re: How to make a report with multiple datasources?

    Its possible to do this? or I need to do 2 reports?
    thanks!

  3. #3
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: How to make a report with multiple datasources?

    Either create a query that joins the tables, or create a new table for reports.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  4. #4
    Join Date
    Jan 2006
    Posts
    197

    Re: How to make a report with multiple datasources?

    I have 2 Stored procedures, I use one to fill the first table and want to use the seccond to fill a seccond table (when I talk of tables im refering to the table control of the reports).
    When I add the elements of the seccond SP to the seccond table control it gives me that error.
    Thanks

  5. #5
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: How to make a report with multiple datasources?

    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  6. #6
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,284

    Re: How to make a report with multiple datasources?

    I agree with post #3 ( although I'm not a database guru, I have done this before ).
    The best solution would be to create either a query that joins the tables ( a junction table )and use that for your source

  7. #7
    Join Date
    Jan 2006
    Posts
    197

    Re: How to make a report with multiple datasources?

    Quote Originally Posted by HanneSThEGreaT View Post
    I agree with post #3 ( although I'm not a database guru, I have done this before ).
    The best solution would be to create either a query that joins the tables ( a junction table )and use that for your source
    Yes, but...they have different number of columns and datatype, I need something like
    receipt1 value code descriptcion
    .
    .
    .

    -------
    dollarSerial dollarValue
    .
    .
    .

    I need to have the data in same page but with different titles/number of columns/number of rows.
    This cant be done with join table...or im wrong?
    thanks

  8. #8
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: How to make a report with multiple datasources?

    Join the table BEFORE you put it into the report. Then, you can create sub-reports using ONE TABLE. More work, but the only way to do it
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured