COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: jbarberio on 17 Dec 2024 10:41:38 AM

Title: String Replace on Member Caption
Post by: jbarberio on 17 Dec 2024 10:41:38 AM
I've created a burst that keys off of a member caption, but some of the values can have a "/" character within the caption itself. When those values are bursted, it's replacing the "/" with "_2F" in the file name since a "/" in the name would obviously cause issues with the full file path. I'd like to replace the "/" up front in the data item that I use for my burst key, so that I can simply replace it with "_" and clean up the naming a bit. Can anyone help with how to accomplish this? I tried using the substitute macro as it was the only option I was finding, but to no avail. My Data source is a TM1 cube for context.

Ex:

Report Name = "MyReportName"
Burst Key Value = "Food/Beverage"

Burst File Name = "MyReportName-en-us-Food_2FBeverage"
Desired File Name = "MyReportName-en-us-Food_Beverage"

My attempt in the code:

#substitute('/','_',sb('my_burst_column'))#