COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: rajasekharbathala on 20 Nov 2012 06:31:24 AM

Title: calling stored procedure
Post by: rajasekharbathala on 20 Nov 2012 06:31:24 AM
Hi guys,

how to call stored procedure in report studio?

i tried with {EXECUTE emp_sp(#prompt('eno','integer')#)} but not working.
Please help me out.

Regards
BB
Title: Re: calling stored procedure
Post by: norkos on 21 Nov 2012 02:16:52 AM
Hi,

As far as I know you can insert SPs only into FWM models and not directly into RS.

If emp_sp is a data query type SP - which return with a result set - than after you insert it into your FWM model, you can set the param of the SP with a prompt.
You can use it from RS after package publication. You can set the param of the SP with a prompt item which parameter name must be the same what you used in FWM (in your case, it's eno).
You can also use its result set, simple insert its query items into your report.
After you run your report and submit your prompt, Cognos will run the SP and the actual result set will appear in your report.

If emp_sp is a data modification SP which doesn't return with a result set, than you can use it only in Event studio and not in RS.

NoRkoS
Title: Re: calling stored procedure
Post by: rajasekharbathala on 21 Nov 2012 07:26:02 AM
Hi,

thanks for your reply Norkos, finally i did it from FM only. I was looking for using SP in Report Studio instead of change the model and republish the package.

Regards
BSK