Hello All !
I have some problem with report in Cognos, I have googled it many times but unfortunatelly didn't find any sastisfying information :(.
I would like to present table with dynamic number of coulms.
Data for dynamic columns are in the database by key - value, number of attributes can be different and also attributes can be various for objects (really important thing is that attributes can have numeric data types but also non-numeric, such as Varchar ), and they can look just like that
Parameter Name of object Attribute Name Value
Parameter 1 Object 1 Attribute 1 Value 1
Parameter 1 Object 1 Attribute 2 Value 2
Parameter 1 Object 1 Attribute 3 Value 3
Parameter 1 Object 1 Attribute 4 Value 4
Parameter 1 Object 2 Attribute 1 Value 1
Parameter 1 Object 2 Attribute 2 Value 2
Parameter 1 Object 2 Attribute 3 Value 3
Parameter 1 Object 2 Attribute 4 Value 4
Parameter 1 Object 5 Attribute 6 Value 6
Parameter 2 Object 5 Attribute 7 Value 7
Parameter 2 Object 6 Attribute 6 Value 6
Parameter 2 Object 6 Attribute 7 Value 7
On Cognos we would like to present the data in that way:
SECTION BY: Parameter 1
Object Name Attribute 1 Attribute 2 Attribute 3 Attribute 4
Object 1 Value 1 Value 2 Value 3 Value 4
Object 2 Value 1 Value 2 Value 3 Value 4
SECTION BY: Parameter 2
Object Name Attribute 6 Attribute 7
Object 5 Value 6 Value 7
Object 6 Value 6 Value 7
Any idea how to do that?? :)
i might be missing something, but how are you constructing your database table so that it'll store multiple datatypes in the same Value field? Or are Value1, Value2 etc. separate fields?
They are stored row by row, new attribute is new row in database.
Yep, I think I get that...it's the Value bit that I'm just not getting. What database are you using as your back end? It might be that I'm used to SQL server and you're using something different (are you?). The way you've laid it out, makes it look like there's a row for each Parameter / Object / Attribute combination, with a column (field) for Value. But then you say that that field (Value) can hold multiple data types. SO...the table would look something like:
Parameter | Object | Attribute | Value |
P1 | O1 | A1 | "Elephant" |
P1 | O1 | A2 | 2017-09-20 |
P1 | O1 | A3 | 42 |
Or have I completely misunderstood?
Typically that column would be a string (varchar)? With all related issues?