COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Report Studio => Topic started by: shank on 11 Jul 2006 04:12:51 PM

Title: (Solved) Passing Multiple Values to Stored Proc Prompt in FM
Post by: shank on 11 Jul 2006 04:12:51 PM
Guys,

How to pass multiple values to a single stored procedure prompt. For
example, for the country prompt it works fine for single value, but not
for multiple selected values like 'america','australia','china','India'
etc.,

I used #promptmany as suggested in th FM documentation, but it is giving error message as "promptmany" not
recognized.

Could you please suggest how to achieve multiple parameter passing.

Regards,

Cognos Pal
Title: Re: Passing Multiple Values to Stored Proc Prompt in FM
Post by: mrcool on 17 Jul 2006 03:53:57 AM
You cannot pass multiple values directly in stored procedure query
subject. Create a data source query subject then call the procedure like

exec <proc_name> #sq(promptmany('param1','char'))#
This will create a multi valued parameter param1 and it will enclose
the parameters within single quotes so that it becomes a string
variable.
In the SP you need to split this into differnt values by using a
function which returns table variable


Thanks,
Mrcool