You are on page 1of 2

Listing out some best-practices which a developer should follow while developing reports in Cognos Report Studio.

Formatting 1. Classes - Define classes for all objects in the report. It would help in maintaining consistency in formatting of all the objects throughout the report page. 2. Consistency Maintain consistency for the formatting options (Font, Margin, Border, etc.) throughout the report. This will help in improving readability. 3. Report Expressions - Add Report expressions above the crosstab for the selection made in the prompts. This will help the user know the selections made in the report; It would also help in the scenario, where there is no data for the selections.

Filters & Prompts 1. Ensure that the report contains filters for every dimension required. The rows fetched from the database will be less. 2. Use = instead of in for single value comparison in filters. This reduces the query run time. 3. Use CASE statement instead of IFELSE, for implementing conditional filter. This helps in improving the performance of the filter execution. 4. Delete filters which are not required instead of disabling them. This is required as unused Code hampers the performance of the report. 5. If a prompt is kept required; the corresponding filter in the query should also be kept required. This is done to maintain consistency between filter and prompt.

Calculations 1. Use in-built calculations instead of calculating manually. This improves performance for the execution of report. 2. Assign proper solve order for the calculated data items. This helps in proper sequence of execution of the calculations. 3. Use explicit brackets for expression definitions. The calculations may give wrong answer if the Brackets are not used in the expressions or calculations of data items. 4. Avoid the usage of tuple function in Calculations unless necessary. The use of tuple function affects the performance as it goes to the detailed level of data, and does it for every record.

Query Items 1. Remove all unnecessary objects from the report. This improves execution because when the report is executed, the data is fetched for all the data items in the report. 2. Use data items instead of Calculated members and Calculated measures. The calculations of members should be done in data items. It helps to reduce the run time of calculations. 3. Special Characters should be avoided in the Query names. This can result in the user being unable to generate the SQL/MDX query.

4. For the query items which are not involved in any type of calculations, set the Aggregate Function and Roll Up Aggregate to NONE. This improves execution of report.

Charts 1. Show Tool Tip for the report items displayed on the chart. This helps the user to easily understand the chart values. 2. Define single Palette for all the charts in the report. This helps to maintain consistency for all the charts used. 3. When using grouping between the data items in the Series; if you want to hide the 2nd data item, keep the source type for that data item to text and dont put any text.

General 1. Use brackets in IFELSE, CASE. and other expression. Not using Brackets in the control structures or expressions may result in Parsing error and readability of the expression reduces. 2. Minimum use of Java Script. Usage of Java script might affect the performance of the report. 3. Use Render variable instead of Style variable to show or hide any report items. Style variable executes the item on the report page and then hides it but the render variable does not execute the item which is not to be displayed in the report page. 4. Use Boolean variables instead of String variables unless string variables are unavoidable. Boolean variables get executed faster as compared to String variables.

You might also like