SQL Server Performance

adding two tables to report

Discussion in 'SQL Server Reporting Services' started by latingntlman, Aug 18, 2008.

  1. latingntlman New Member

    I need to have two tables that get their data from a stored proc. Here's what I'm trying to accomplish:
    One table needs to include members added in the last seven days.
    Table two needs to include members who bought product in the last seven days regardless of when they were added. This means that there may a member(s) in both tables at times, which is expected. MY sql code works and it passes all those added in the last seven days or who purchased in the last seven days.
    My challenge is how do I make sure those added last seven days but not purchased in last seven days show in table one or those added in last seven days and bought in last seven days show up in both. Also those not added in last seven days but bought in last seven days to show up in table two, and again those who bought in last seven days and added in last seven days to show up in both tables.
    Is there a way to set up filters in RS when the data source is a stored proc? Or do I create two stored procs that splits the data and have two data sources connecting to the report? if so, then how?
    Any light on this will be appreciated.
    thx,
    John
  2. MichaelB Member

    for SSRS to use two sets of data, they must be from two seperate data sources. One proc can return multiple dataasets, but RS will only use the first one and will ignore the second. Hope this helps!

Share This Page