Stored procedure creates test output but no record list runtime

Hi there,

Some help needed here. I have some logic that:

  • builds sql
  • stores the sql in a temp table with a GUID to identify it
  • calls a SSRS report that executes a stored procedure with GUID as parameter
  • the stored procedure retrieves the sql and executes the stored sql with "exec sp_executesql @stmt" within the stored procedure
  • the reports displays the result set of the sql

Now I need the same result set in the application. I do the same thing:

  • store the sql in the temp table with the GUID
  • pass the GUID to the advanced query that executes the same stored procedure as in report
  • The test output of the Advanced Query shows me the results

However, at runtime the recordlist stays empty:

I must be doing something wrong here, but i do not see why the test output would give results and runtime no.

Help is welcome,



Have you checked the service center, SQL server or SSRS logs to see if there are any errors happening behind the scene? 


John hi,

Just found out i called the advanced query with the wrong parameter... Works like a charm now.

Thanks for your input.