How Call a Stored Procedure in SQL Query on Report

Hello, i cant call a stored procedure from my sql query on report designer. I watch online video, but i need something diferent.

i Have a SP in SQL Server:


DECLARE @return_value int

EXEC @return_value = [dbo].[Prueba]

SELECT ‘Return Value’ = @return_value


but i don´t know how call in ignition report designer

I try with this form:
call = system.db.createSProcCall(“Prueba”)

but don´t work.
Thanks for us help

Hi Marco,

After you execute the stored procedure you get the results by calling call.getResultSet(). Here is an example:

call = system.db.createSProcCall("Prueba") system.db.execSProcCall(call) results = call.getResultSet() table = event.source.parent.getComponent("Table") = resultsThe example above gets the result from the stored procedure and sets the data in a table that is in a window.