How to bind 3 tables return by SP to 3 table in SSRS page

  • Hi,

    My rquirement is,

    On a Page I had 3 tables,

    I export this table in single excel file,with 3 different sheets.

    The dataset used for this 3 tables are taken genrated in single stored procdure.

    But in SSRS it return only first table,thats why I am not able to return rest 2 tables.

    Please guide me how to bind all the 3 tables in SP to 3 tables.

  • I don't think you can. You may have to create 3 datasets in SSRS with 3 different SP's.

  • Is your stored procedure producing 3 result sets with one call, or do you call the sp 3 times with different parameters to produce the 3 result sets?

    Note that SSRS is only smart enough to see the column names and types of the FIRST result set returned. If the sp is parameter driven and conditionally produces different result sets, SSRS will not automatically build the correct field. You'll need to delete what it autogenerates and manually add your own.

    Gerald Britton, Pluralsight courses

  • Query Designer in SSRS doesn't support multiple result set, if multiple result sets are retrieved through a single query, only the first result set is processed, and all other result sets are ignored. Please see:

    http://msdn.microsoft.com/en-us/library/dd239331.aspx

    For you requirement, the best workaround save the result sets into 3 separated tables. Then use three datasets to retrieve the data.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply