COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: SGD on 22 Nov 2011 11:33:45 PM

Title: Convert list values in sentence
Post by: SGD on 22 Nov 2011 11:33:45 PM
Hi All,

I have a list which shows following values in it:

Vehicle ID        Instances
ABC                 10
XYZ                  5
JKL                   7

Now I want to display above Vehicle IDs and its corresponding Instances count in below sentence.

QuoteThere were 10 instances of ABC, 5 instances of XYZ and 7 instances of JKL vehicle with an angle of attack exceeding 30mRad.

Could please someone let me know whether is it possible to implement in Cognos 8.4.1? If yes then how?

Thanks in advance.
Title: Re: Convert list values in sentence
Post by: pricter on 23 Nov 2011 02:09:27 AM
Try using a repeater with a combination of texts
Title: Re: Convert list values in sentence
Post by: HalfBloodPrince on 23 Nov 2011 02:16:29 AM
But it wil give you  result like this
There were 10 instances of ABC      There were 20 instances of KBC
There were 5 instances of XYZ         There were 30 instances of HP
Title: Re: Convert list values in sentence
Post by: pricter on 23 Nov 2011 02:23:27 AM
If you place a text item "There were" and then a repeater it will give you
There were 10 instances of ABC 5 instances of XYZ
and if you perform a running count on vecicle id you can find the first and last vehicle id in order to show "," or "and" or nothing