COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Framework Manager => Topic started by: jsj2021 on 21 May 2021 04:55:42 PM

Title: Stored Procedure not returning results during testing
Post by: jsj2021 on 21 May 2021 04:55:42 PM
I have a stored procedure from a SQL Server database that I'm using in FWM.  I have 3 prompts, two date prompts and a string prompt.  When I try all three prompts I get no data back.  If I modify my stored procedure to use the date prompts, it returns data.  As soon as I add the string prompt macro back in, it runs but no results are returned.

I formatted the prompt macro:  #prompt('Dept','string')# 

Any help in resolution would be much appreciated.
Title: Re: Stored Procedure not returning results during testing
Post by: bus_pass_man on 22 May 2021 02:06:25 PM
The problem seems to be concerning your string prompt macro.

What values are you using to test the macro? 

What data type is the query item being filtered?

How do you know that the values which you are using are correct?

Examine the SQL which is generated and verify that it is what you expected. 

Remove your date prompts and use just the string prompt. Verify the results.
Title: Re: Stored Procedure not returning results during testing
Post by: jsj2021 on 24 May 2021 08:27:19 AM
Thanks for the reply.  In this instance, I was able to resolve, by changing the prompt macro to #prompt('Office','string',,'N ')#,  for the stored procedure, it want's an N in front of the prompt value.  Setting it up this way does return results in FWM.  However, the prompt in the Report then doesn't seem to recognize any value put into it.  I will review further.  Getting there.