COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: pricter on 14 Nov 2011 10:05:45 AM

Title: Substitute macro works only for the first finding
Post by: pricter on 14 Nov 2011 10:05:45 AM
Hi to all

I used the "substitute" macro to replace the cube that I use
for example

#
substitute
(
'Great Outdoor Sales 2',
'great_outdoor_sales_en',

promptmany('IMSP', 'memberuniquename', '[Great Outdoor Sales 2].[Products].[Products].[Product line]->:[PC].[@MEMBER].[991]', 'set(', '', ')')
)
#
The report works fine if I make a selection in the tree prompt but when I make two selections the "substitute" macro replaces only the first search string but not the second.

How should write the macro in order to substitute all the search strings and not only the first one?