Introduction
This chapter will introduce you to an interesting and useful tool in IBM Cognos BI called Macros. They can be used in the Framework Manager as well as the Report Studio. In this book, we are not covering the Framework Manager; therefore, I will restrict myself to the use of macros in the Report Studio.
Generally, macros are thought to be a way to add programming and to automate tasks in most applications; for example, in Excel macros. However, in Cognos reporting, a macro is a way to make some key changes in the report specification at runtime based on prompt values, user security, and so on.
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 the report specification like a literal string replacement. We can use this to alter data items, filters, and slicers at runtime.
In previous versions, it was difficult to find any information about Macro Functions within the Report...