The Cognos engine understands the presence of a macro as it is written within a pair of hashes (#). It executes the macros first and puts the result back into report specification like a literal string replacement. We can use this to alter data items, filters, and slicers at run time.
Here are some examples of macro functions:
1. Prompt: [Country Name] = #prompt('Country')#.
· Create a simple report which is having Country Name,Area Name,Project Desc and Francise columns.
· Go to Query Explorer and open the query used by list.
· Add a detail filter with following definition:
[Country Name] = #prompt('Country')#.
· After running the report we can see a mandatory prompt for Country Name.
2. PromptMany:[Area Name] in (#promptmany('AreaName')#)
· Create a simple report which is having Country Name,Area Name,Project Desc and Francise columns.
· Add a detail filter with following definition:
[Area Name] in (#promptmany('AreaName')#)
· After running the report it will allow you to enter multiple values
Thank you..!
ReplyDeleteCan we use macro with parameter map?
ReplyDeleteHi Terence,
ReplyDeleteCan you provide one scenario as how to create a macro in parameter map
Hi,
DeleteHere is an example,
#$pm_columns{ promptmany('Time Granularity','token','DY')}#
where
pm_columns is a parameter map name
Time Granularity is the prompt name
Thanks
https://saglamproxy.com
ReplyDeletemetin2 proxy
proxy satın al
knight online proxy
mobil proxy satın al
TZK