COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: fra2578 on 30 Dec 2015 07:52:28 AM

Title: Split a variable into two variables
Post by: fra2578 on 30 Dec 2015 07:52:28 AM
Hello everybody

i'm starting to use for first time Report Studio some days ago: It's seems a powerfull tool, but also a little complex.
Inside a report , i need to split a Package variable into two variable .
Example:
Variable1='hello guys'
Variable2='hello'  (the first value from splitting 'Variable1')
Variable3='guys'  (the second value from splitting 'Variable1')

In UserGuide, seems this can be done using a funtion like in the example:
Example 1
# csv ( split ( '::', 'ab=c::de=f::gh=i' ) ) #
Result
'ab=c', 'de=f', 'gh=i'


but
1 - it may be applied into a function, and i don't know how to use it
2 - it is based on constant value and not on other variable

Anyone can help me ?

Thank you