COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: gnraj on 13 Oct 2014 04:04:56 AM

Title: Combining multiple coulmn into single Column in List Report Studio with condtion
Post by: gnraj on 13 Oct 2014 04:04:56 AM
Hi All,


Model: Relational
Version: Cognos 10.1.1

As shown below is report we need Summary as result in List Report combining all fields into single as Summary, 
please some one could suggest if you comeup with query for the below

Condition is All "Y"  should concatenated with comma at result Summary  ('N' should be NULL at result Summary table)

EMAIL   FAX   IN_PERSON      VERBAL        PRINT                    Summary
Y           N           N                N                    Y                           Email, Print
N           Y           Y               N                    N                          Fax, In_person
Y           Y          Y               N                    N                          Email, Fax, In_person
Y          Y          Y               N                    Y                         Email, Fax, In_person, Print
N          N         Y               Y                    Y                         In_person, Verbal, Print

waiting prompt response

Thanks
G NRAJ
Title: Re: Combining multiple coulmn into single Column in List Report Studio with condtion
Post by: HalfBloodPrince on 13 Oct 2014 07:05:34 AM
Hi not pretty sure about your requirement. you can achive it by adding a reapeter from tool box. then unlock and add five columns then create 5 vraiable to render particular query subject inside of reapeater if its not null.
Title: Re: Combining multiple coulmn into single Column in List Report Studio with condtion
Post by: gnraj on 14 Oct 2014 03:25:17 AM
Thanks for your prompt response,

Requirement is i need to combining  all 5 coumns( EMAIL, FAX, IN_PERSON, VERBAL, PRINT)  into Summary to display only Conditioned of "Y"  needed like below

eg:
(1) If [EMAIL]='Y" then 'EMAIL'  into Summary Column
(2) If [FAX]='Y' then 'FAX'  into Summary Column
(3) If [IN_PERSON']='Y'  then 'IN_PERSON' into Summary Column
(4) if[VERBAL]='Y' then 'VERBAL' into Summary Column
(5) if[PRINT]='Y' then 'PRINT' into Summary Column

In above (1) and (2)  is with 'Y'  Condition then Summary Column should be |EMAIL, FAX|
(1) and (2) and (3)  is with 'Y'   Condition then Summary Column should be|EMAIL, FAX, IN_PERSON|
(1) and (2) and (5)  is with 'Y'   Condition then Summary Column should be |EMAIL, FAX, PRINT|
(1) and (2) and (3) and (5) is with 'Y'   Condition then Summary Column should be |EMAIL, FAX, IN_PERSON, PRINT|
(2) and (3) and (4) and (5) is with 'Y'   Condition then Summary Column should be |FAX, IN_PERSON, VERBAL, PRINT|


Thanks
GNRAJ






Title: Re: Combining multiple coulmn into single Column in List Report Studio with condtion
Post by: HalfBloodPrince on 14 Oct 2014 06:46:33 AM
add all the five columns in your repaeater. then create five boolen variable. for  example email

[Email] is not null then render column email for the yes value , similarly do for ramaining
Title: Re: Combining multiple coulmn into single Column in List Report Studio with condtion
Post by: gnraj on 15 Oct 2014 06:13:39 AM
Thanks ton for your valubale suggestion

Thanks
GNRAJ