I am trying to create a new SSRS report that will return and display SQL Server stored procedure values. I will pass the @clientID
parameter to the stored procedure. This parameter is used in 3 different BEGIN
/ END
statements. Each BEGIN
`END` statement takes this parameter and makes a request, returning specific data.
When I create an SSRS report, I point to the data source for this stored procedure, but only the result obtained from the first BEGIN
/ END
statement is returned. If I run the stored procedure in SSMS, I get 3 different result sets, as expected.
How can I get these 3 BEGIN
/ END
result sets in one report?
Code example:
CREATE PROCEDURE pClientData (@clientID varchar(30)) AS DECLARE @Orders table ( ... ); DECLARE @Results table ( ... ); DECLARE @Status table ( ... ); BEGIN SET NOCOUNT ON;
Request from SSRS:
EXEC pClientData @clientID
source share