COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: t1701 on 22 Oct 2012 04:58:50 AM

Title: Change variable bool to string
Post by: t1701 on 22 Oct 2012 04:58:50 AM
I have a report created a while ago which uses a bollean variable for conditional formating. It allows 2 versions of a report to be run.
Now they have asked for a 3rd version which means I have to change the boolean variable to a string variable.
If I create a new string variable, I need to go through every object in the report and document what the bool variable does and it controls a lot of formatting.
Any suggestions?
Title: Re: Change variable bool to string
Post by: Greg on 22 Oct 2012 08:45:02 AM
You could edit the report spec xml by hand by copying report to clipboard then pasting into a text/xml editor.  Add the new string variable first with a different name, then in the xml delete the old boolean variable and rename the string variable, then do a global search and replace for the conditional formatting substituting the new values of your string variable for the true/false values of the boolean.  Once you're done, copy the text file to clipboard then in report studio select Tools -> Open Report from Clipboard.