I'm using Cognos Analytics 11 report studio and I'm trying to bring in a number field with trialing decimals. However, the data only shows up to 8 decimal places.
I know in Cognos 11 you can limit the number of decimals by going to Data > Data Format > Number > Number of decimal places. But even after trying this to increase the number of rendered decimals, I am stuck at 8.
If I paste the generated SQL into my dbms I can verify my data should have at least 13 or more decimal places. At this point im stuck and not too sure what else to try?
Note: This is happening with all export types; HTML, Excel, CSV, PDF. All have the same issue.
I've never seen Cognos intentionally exclude decimal length. Like the thread above, I'm also assuming it's because either 1. The precision is undefined or set to 0 or 2. The restrictions Cognos Analytics applies when accessing Oracle data.
Keep in mind, something like this is understandable when exporting as a CSV file since it has decimal limitations.
I will look into the two cases above and I'll update my answer if I find anything new. For the interim, if you're needing a solution urgently, you can try some of the following and see if they either fix the issue or give you a potential workaround.
Typically, specifying the data format number's decimal length should work (excluding CSV). Like you said above, for this you would go to Data > Data Format > Number > Number of decimal places.
When specifying the data format, make sure to include all ancestors for the column; it's possible you are leaving one out. If your report is in a list, ensure you are specifying the decimal precision under both the
"List Column" and "List Column Body" selections.
In theory, if specified for both selectors this should force a higher decimal precision. Keep in mind, for CSV exports will ignore data formatting rules through Cognos. So this will only work as HTML, Excel, PDF.
If the above solution fails, another possible workaround would be to wrap your item (under the expression definition) in a to_char() or casting as numeric. Specify the formatting within and it should look something like this to_char("Column Name", '99.9999999999') or cast("Column Name", numeric(30,16)).
This would account for 10 decimal places though you can really make it however long you need.
What's nice about this workaround is if your value only includes 9 decimal places, even if formatted for 10, you won't receive the trailing 0 on the end and the precision will cut off after its true value. This also works for CSV exporting unlike the above method.
Hopefully one of these helps! I will update this if I find the initial reason for excluding past 8 decimals.