If you are unable to create a new account, please email support@bspsoftware.com

 

Use Arrays to flattening multiple lines of data to 1 entry per person?

Started by sacjeanie, 15 Jul 2015 11:14:23 AM

Previous topic - Next topic

sacjeanie

I work in a University and we are consistently being asked to provide lists where they want only one line of data per person.  For a simple example, imagine a list of students with some biographic information (e-mail, class level, status) along with columns of courses they are taking with that semester.  if they are only taking two courses, there would be data in the first two course columns.  If they were taking six courses, there would be six columns of data. 

I was reading through the documentation and was wondering if I can generate this uniquely for each student record by creating an array of registered classes and displaying the contents of that array within the student line in multiple columns. 

This is just one of many examples that I would like to learn a better technique to do this.  An array may not be the tool to tackle this problem.  Our data tables are relational and not dimensional. We are on Cognos 10.2.1.

My go to method has been to link multiple queries, one at a time and I know it is not the most elegant solution.

Any and all suggestions would be appreciated.

Jeanie Krieger
Sac State University

bdbits

I think the sort of thing you are looking for can be done with repeaters embedded inside a list report and a master detail relationship. Does that make sense?

Robl


sacjeanie

I will look into it.  It is not something I've done before.  I'll see if I can find documentation on it.  Thanks for looking at my questions.

sacjeanie

The repeater table/fields worked well.  However, when I export to Excel these field values are not included.

TIP:  When generating the repeater table, make sure to set the properties of the repeater table to include all of the fields from the master/detail relationship.  That was critical for making all of the values display on the report.

Tip 2: If you need to have multiple field in the repeater table, it's easiest to create a data filed with all of the elements you need concatenated. 

Thank you for this point into the right direction.