Showing posts with label Report Studio. Show all posts
Showing posts with label Report Studio. Show all posts

Thursday, March 10, 2011

Best Practices – Cognos Report Studio

Listing out some best-practices which a developer should follow while developing reports in Cognos Report Studio. For more information, go through Report Studio User Guide.

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 IF…ELSE, 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 don’t put any text.

General:

1. Use brackets in ‘IF…ELSE’, ‘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.

Friday, February 25, 2011

Cognos Report Studio - II

Q. What is Condition Explorer in Report Studio?

Ø  Condition Explorer allows you to manage the variables that are being used in the report.

Q. What is a Page set in Cognos Report Studio?

Ø  The set of pages to render according to a grouping structure.

Q. What are classes in Cognos Report Studio?

Ø  Classes provide a default style to be applied to the objects.

Q. How you do “Conditional Highlighting” on a report in Report Studio?

Ø  The steps to add conditional highlighting to a report are listed below:
a)     Select the list column body for which you want to set conditional highlighting.
b)    From the Style toolbar, click Conditional Styles.
c)     In the New Conditional Style list, select Advanced Conditional Style.
d)    Type a name for the style. Click on New Advanced Condition.
e)     In the Expression Definition pane, specify terms for the expression.
f)     Select a style from the Style list. Edit to define a custom style.
g)    Click Ok and run the report.

  Q. How do you convert a list to cross-tab in Cognos Report Studio?
Ø  To convert a list to a cross-tab, follow the listed steps:
            1. Click the columns that you want to appear as columns or nested columns in the cross-tab.
            2. From the structure menu, click “Pivot List to Crosstab”.

Q. How can you hide an object in Report Studio?

Ø  Set its “Box Type” property to “None”.

Q. How do you hide the rows that have null values?

Ø  You can hide the rows having null values by applying conditional formatting as when you find null values in rows make the box type none in the properties.

Q. How can you hide a column in Report Studio?

Ø  For Crosstab reports –
a)     Group on the column and create aggregation to have the column total in the bottom row.
b)    Click the Unlock button on Report studio toolbar.
c)     Now select the “text item” and delete it.
d)    Select the empty crosstab node after deleting the text. Change its padding to 0 pixels and font to 0.001 pt size.

Q. How can you Specify what appears when no data is available in a report?
Ø  The steps  are as listed below:
a)     Select the data container in the report.
b)    From the properties pane, set the “No Data Contents” property to Yes.
c)     No data contents tab is displayed, which can be used to drop “Text item” or “Layout Calculation” to be displayed in case of no data in report.

Thursday, January 27, 2011

Cognos Report Studio

Q. What are the different types of reports in report Studio?

Ø  The different types of reports available in Report Studio are listed as:

            1. List
            2. Crosstab
            3. Chart
            4. Map
            5. Repeater

Q. What are Prompts in Cognos Report Studio? List the different type of prompts?

Ø  Prompts act as questions that help users to customize the information in a report.
Different type of prompts can be listed as:
a)    Text Box Prompt – Retrieves data based on a value that user’s type.
b)    Value Prompt – Retrieves data based on values that user’s select from a list.
c)    Search & Select Prompt – Retrieves values based on search criteria that users specify.
d)    Date Prompt – Retrieves data based on a date that users select.
e)    Time Prompt – Retrieves data based on a time that users select.
f)     Date & Time Prompt – Retrieves data based on a date & time that users select.
g)    Interval Prompt – Retrieves data based on a time interval that users specify.
h)    Tree Prompt – Retrieves data based on values that users select from a list (Returns a set of members from hierarchy). It is used when working with dimensional data.
i)      Generated Prompt – Selects a prompt control based on the data type of the data item.
 
Q. What are Cascading prompts?

Ø  Using cascading prompts, the values in one prompt are driven by what is selected in another prompt.

Q. What are the different types of filters available in Report Studio?

Ø  Report Studio – Report studio provides three types of filtering:

a)     Detail filter – Detail filters are used to filter detail level values within a report. They work at the lowest level of granularity in the selected objects.
Example: We can apply a detail filter on “Sales Month” to extract all transactions which occurred within the specified month.

b)    Summary filter – Summary filters are used to filter summary level values within a report.
Example: We can apply a summary filter to get the highest sold product in a sales region.
We would need to group the “Region” and “Product” fields beforehand.

c)     Slicers – Slicers are used with dimensional models. A slicer filter affects the cell value, not the row or column edges. Slicers are useful if you want some data in a report to be hidden and other data to be visible.
            Example: We can apply a slicer if we want a report displaying all “Product” names but sales data only                    for a few and not all products.  

Q. What are the different types of variables in Report Studio?

Ø  The different variables are :
a)     Boolean Variable
b)    String Variable
c)     Report Language Variable

Q. What are classes in Report Studio?

Ø  Classes in Report Studio provide a default style to be applied to the objects.

Q. What is Condition Explorer in Report Studio?

Ø  Condition Explorer allows you to manage the variables that are being used in the report.

Q. What’s the difference between Drill-through report & Master-detail report?

Ø  Drill-through Report – Links 2 separate reports containing related information. (Target & Source report). Steps to create are listed below:
a)     Create a target report with detail filter that uses the parameter on which you want to filter when drilling through from the source report. Save the report.
b)    Create a source report that contains the item you want to use for drill-through.
c)     Select the item to be used as the drill-through and click on Drill-Through definitions button on the standard toolbar.
d)    Click new drill through definition button. Select the target report and fill the required options.
e)     Click Edit to display the parameters. Select method as “Pass Data item value”. Select value from the source report.
f)     Click Ok and then run the report.

Ø  Master Detail Report – Links information between two data containers (eg. List, crosstab, chart) within a report. Using master-detail, you can use a single report to display information from two reports. Steps to create are listed below:
a)     Create a new report having two data containers E.g. Crosstab and Chart. Insert data items into both containers so that 2 queries are created E.g. Query1 and Query2.
b)    The 2 queries should have at-least 1 Common data-item.
c)     Click “Unlock” icon from Toolbar to unlock page objects. Select 2nd container object, and drag it into the 1st container where you want to place it.
d)    Click embedded container object. Click Master Detail Relationships from Data menu. Create “New Link” between the common data-item.
e)     Click Ok and run the report.

Q. How do you set security for reports?

Ø  You can set security from the report properties in Cognos Connection. You can add users / user classes with read/write/execute/traverse/set policy level access.
   Cognos Connection à Report Properties à Permissions

Q. What is a “Layout Component Reference” in Report Studio?

Ø  “Layout Component Reference” is an object in Report Studio which is used to give a reference to another object in the report. It helps to reuse an object instead of creating it again.
Example – It can be used to include a Company Logo on all pages of a report.
Steps:
a)     Create 2 page report; List on first page and Crosstab on second.
b)    Add Company logo on first page and give it a unique name.
c)     On second page, add “Layout Component Reference” object where you want the same logo to be displayed.
d)    Check on “This Report” option and select the “Company Logo” object.