Wednesday, May 20, 2009

Tips and Techniques

How to format numbers like SSN, Phone numbers, Zip codes, ISBN, Account Numbers etc?
It is very common to find SSN and other number data types stored as XXXXXXXX but the users would like to see it as XXX-XX-XXXX.
You can achieve the formatting by using substring, LTRIM and RTRIM etc. However, these functions are resource intensive. We have a better solution. Try this.
stuff(stuff([field_expression_SSN],3,0,'-'),5,0,'-')

How to save real estate on prompt page when working with Date prompts.
In the properties pane of the date prompt control, set “Select UI” property as Edit box. The default UI for date prompt is Calendar. This consumes a lot of space. The edit box also allows for typing in.

Why we shouldn’t edit data source query subjects?
Cognos generates most optimized queries if the import layer has data source query subjects. Framework Manager will not fetch metadata at runtime if it has data source query subjects available. If a Data source query subject is edited then Cognos fetches the metadata from the database each time the query is run.

Why do you see year field with values like 2016, 2032?
The reason is aggregate property was set incorrectly by the modeler. The modeler set the aggregate property to ‘Sum’. It should be unsupported or maybe count. The Usage property can be edited as attribute. You as a report developer can set the aggregate property to ‘None’ on the report.

Render Variable
Render Variable is not available on table cells or rows. To render or hide a table cell or table row use style variable.