COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: jasmina on 29 Oct 2014 05:36:24 AM

Title: Concatenate data items in DMR Cognos Report
Post by: jasmina on 29 Oct 2014 05:36:24 AM
Hi,
     How Could we Concatenate data items in DMR Cognos Report???? Please see Below

  For Ex.

     Hierarchy1
              - Level1
              - Level2
              - Level3
              - Level4
     We have tried following ways but its not Working.

    Data Item1 = Level1 || Level2

    Data Item1 = Level1 + Level2

    Data Item1 = Concat( Level1 , Level2)

    Data Item1 =  cast(Level1 ,varchar2(50) ) || cast(Level2 ,varchar2(50)

Any Idea How could we Achive the desired Result???
Title: Re: Concatenate data items in DMR Cognos Report
Post by: MFGF on 29 Oct 2014 08:08:04 AM
Quote from: jasmina on 29 Oct 2014 05:36:24 AM
Hi,
     How Could we Concatenate data items in DMR Cognos Report???? Please see Below

  For Ex.

     Hierarchy1
              - Level1
              - Level2
              - Level3
              - Level4
     We have tried following ways but its not Working.

    Data Item1 = Level1 || Level2

    Data Item1 = Level1 + Level2

    Data Item1 = Concat( Level1 , Level2)

    Data Item1 =  cast(Level1 ,varchar2(50) ) || cast(Level2 ,varchar2(50)

Any Idea How could we Achive the desired Result???

Can you explain what you are trying to achieve and why?

MF.
Title: Re: Concatenate data items in DMR Cognos Report
Post by: CognosAnalytics on 29 Oct 2014 12:43:03 PM
Hello Jasmina,
You can create a data item as such...
roleValue('_memberCaption',[Level 1])
+
roleValue('_memberCaption',[Level 2])
+
roleValue('_memberCaption',[Level 3])
+
roleValue('_memberCaption',[Level 4])

But, like MFGF, I am curious too, why are you doing this :) ?

Cognos810