Debugging macros in Cognos Report Studio

There is little to no help when debugging macros in Cognos Report Studio. One can never be really sure of what the Data Item with a macro function inside will return and there is no clear built in way to find that out.

The quick tip/workaround is to temporarily enclose all of your macro into the sq (single quote) statement. That way when you are trying to construct, for example, a member unique name, you can run the Tabular Data view and will receive cognos macro output as plain text item.

Being able to see the exact output before cognos query optimizer gets its hands on the value makes life a whole lot easier! It is here you will find all the extra square brackets that are added by array function and all the single quotes that come together with default csv function behavior.

No comments:

Post a Comment