COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Framework Manager => Topic started by: Cognos Talk on 16 Apr 2014 03:23:50 PM

Title: Passing parameters to SQl Server Stored Procedure from Cognos Framework Manager
Post by: Cognos Talk on 16 Apr 2014 03:23:50 PM
version 10.2

I imported stored procedure into the Framework Manager and it uses two parameters: @from and @to dates
(PROCEDURE up_get_data( :@From IN date, :@to IN date );


Then for definition entering value I put #$pDateFrom{prompt('pDateFrom','Date')}# for start date and #$pDateTo{prompt('pDateTo','Date')}# for end date.
I validated query subject and it said that the parameter values are null.
I clicked on test and entered the values  2000-01-01 and 2014-04-10 click ok and nothing came back from the database.
When I looked at the query information 
It was showing  CALL "tps_reporting"."aaa"."up_get_data" ( null, null ) for values for native query.
when tracing from database server it is passing the parameter properly. The database is sql server 2008.
Can someone help with this mater, it is urgent.
Thank you very much for your time and support

Title: Re: Passing parameters to SQl Server Stored Procedure from Cognos Framework Manager
Post by: MFGF on 16 Apr 2014 03:56:41 PM
What do you see if you use ?pDateFrom? as the Start Date value and ?pDateTo? as the End Date value?

MF.
Title: Re: Passing parameters to SQl Server Stored Procedure from Cognos Framework Manager
Post by: Cognos Talk on 17 Apr 2014 06:47:54 AM
Please take a look at the screenshots attached.
Inside Cognos it does not update any parameters, generating and showing null values in query information window, but in the database with tracing log it shows the date passing.

Title: Re: Passing parameters to SQl Server Stored Procedure from Cognos Framework Manager
Post by: Cognos Talk on 17 Apr 2014 07:59:14 AM
Thank you for your reply, it did work when I entered simply ?pFromDate? and ?pDateTo?
Many thanks, it works now!!!
Title: Re: Passing parameters to SQl Server Stored Procedure from Cognos Framework Manager
Post by: MFGF on 17 Apr 2014 08:15:30 AM
Simple solutions are often the best :)

Glad it works!

MF.
Title: Re: Passing parameters to SQl Server Stored Procedure from Cognos Framework Manager
Post by: Cognos Talk on 17 Apr 2014 08:18:02 AM
Yes, I agree, instead of using complex macros!!!
Much appreciated!!!