How can I access the return value of a stored procedure in a report ?
Sample:
CREATE PROCEDURE SomeSP
AS
declare @rows int = (Select Count(*) from someTable)
Select TOP 100 from someTable
return (@rows)
END;
In that case I want to display the returned @rows count in the report.
Thanx
peter
Access stored procedures return value
Re: Access stored procedures return value
Hello,
As a way, try to use the following procedure:
...
declare @rows int = (Select Count(*) from someTable)
Select TOP 100 *, @rows from someTable
...
Thank you.
As a way, try to use the following procedure:
...
declare @rows int = (Select Count(*) from someTable)
Select TOP 100 *, @rows from someTable
...
Thank you.
Re: Access stored procedures return value
Hi Aleksey,
that generates too much oveerhead. The use case for that handling deals with large row count.
Is there maybe a hook/event or override in the report where i can add an additional parameter with direction ReturnValue ?
Thanx
Peter
that generates too much oveerhead. The use case for that handling deals with large row count.
Is there maybe a hook/event or override in the report where i can add an additional parameter with direction ReturnValue ?
Thanx
Peter
Re: Access stored procedures return value
Hello,
Unfortunately, the output parameters does not supported.
As a way you can add additional datasource in report in which calculate a row count in table.
Select Count(*) as rowCount from someTable
Thank you.
Unfortunately, the output parameters does not supported.
As a way you can add additional datasource in report in which calculate a row count in table.
Select Count(*) as rowCount from someTable
Thank you.
Re: Access stored procedures return value
Hello,
I've choosen your proposal to add an additional column to the result set. That's less overhaed as initially expected.
Thanx
Peter
I've choosen your proposal to add an additional column to the result set. That's less overhaed as initially expected.
Thanx
Peter
Re: Access stored procedures return value
Hello,
Let us know if you need any additional help.
Thank you.
Let us know if you need any additional help.
Thank you.