Hello, I've created a datamodule from a package in Cognos 11.
The data collected from a table does not have an ID field so I want to create the ID field manually.
is it possible to make a calculated field that generates an unique number for each row in the query?
:-\
You could create a row counter data item e.g. running-total([Data Item]) which gives you a number för each row.
You can also create a layout calculation using the RowNumber() function.
Nice ;D
thanks!
Or you could create a data item that creates a specific number depending on the value/string of a certain column:
case
when [Data item] = 'Car' then 1
when [Data item] = 'Train' then 2
when [Data item] = 'Boat' then 3
else null
end
No problem :)
Is it possible that the keys in your query subject were hidden in the package? If you need to use them, change the package to expose them.
It is possible that the techniques above could produce results which could vary over time.