Sunday, August 23, 2009

Best Practices for Cognos 8 BI

Table of Contents

1. Purpose

2. Scope

3. Modeling – Framework Manager

4. Report Design

5. Performance Tuning

1. Purpose

This document details the various design approaches to be used in Reporting for generating Cognos 8 reports. This is a technical paper that explains different report complexities and the various design options available to achieve them using Cognos Cognos 8 Report Studio. The document explains each option and weighs the advantages and disadvantages for each option. This document is a compilation of various options that were thought feasible keeping in mind the current environment and as per the requirements for reporting.

2. Scope

The design approaches considered in this document include

Ø Report Design – Cognos 8 BI

Ø Performance Tuning of the Reports – Cognos 8 BI

Note: The practices & approaches considered for a particular functionality / operational concept / process may result in trade-off on part of the functionality but will be performance optimal.

3. Modeling – Framework Manager

I. Verify Relationships And Cardinality:

Detect Cardinality from the Data Source

When importing from a relational data source, cardinality is detected based on a set of rules

specified by the modeler.

The available options are:

• Use primary and foreign keys

• Use matching query item names that represent uniquely indexed columns

• Use matching query item names

The most common situation is to use the first two options: primary and foreign keys as well as

query items that represent uniquely indexed columns. When you use these options to import your metadata and generate relationships, remember that you are adding this information to your model (this is important to note for later sections of this paper).

Note: Optional relationships, full outer joins, and many-to-many relationships can be imported

from your database and are supported for query execution. Recursive relationships can be

imported from your database and will appear in the model but they are not supported for query

execution.

Usage of Cardinality in Query Generation

Framework Manager Modeling Guidelines:

The general rule applied to cardinality is as follows:

0-to-n or 1-to-n cardinality implies FACT

0-to-1 or 1-to-1 cardinality implies DIMENSION

These rules are applied in the scope w\of what is included in any given query. Framework Manager supports both minimum/maximum cardinality as well as mandatory/optional.

In cases where minimum/maximum cardinality is defined (as recommended by Cognos’s best

practices) it will be applied to identify facts and dimensions.

The basic rules that apply to the usage of cardinality are:

• Cardinality is applied in the context of a query -- only the cardinalities of items explicitly

included in the query are evaluated.

• Query subjects defined with 1-to-many or 0-to-many cardinalities are identified as facts.

• Query subjects defined with 1-to-1 or 0-to-1 cardinalities are identified as dimensions.

• It is possible to have a query subject behave as a dimension in one query and as a fact in

another.

Note: When only mandatory/optional cardinality is employed, SQL generated will not be able to

compensate for double counting that can occur when dealing with hierarchical relationships and

different levels of granularity.

Identifying Facts and Dimensions:

Within the context of a query, a query subject that has only maximum (n) cardinality on all its

relationships to other query subjects can be regarded as a fact. The implication is that there are

more rows of data in the fact query subject than in the related query subject on the minimum (1)

side of the relationship. Any query subject having at least one relationship to another query

subject with minimum cardinality (1) will be treated as a dimension.

Analyze a Schema for Facts and Dimensions:

Example 1: In this example, all four query subjects are included in a query. The diagram shows

that the query subjects having only maximum (n) cardinalities are treated as facts.

Example 2: In this example, only three query subjects are included in the query. The diagram

shows that the Order Header query subject is now treated as a fact.

Example 3: In this example, query subjects whose cardinality indicates that they are always facts

are circled in blue. Areas where the behavior is dependent on the context of the query are circle

in red. All query subjects that are not circled behave as dimensions in all cases.



II. Simplify the Model with Dimensional Concepts

Framework Manager Modeling Guidelines:

Use the cardinality rules from the previous section to identify areas of the model that ambiguously identify dimensions or facts.

Collapse groups of query subjects with hierarchical relationships into a single query subject per business concept (typically applies to dimensions).

Collapse groups of query subjects with master/detail relationships into a single query subject per business concept (typically applies to facts).The end result of simplifying the model should be a layer of query subjects that clearly representthe data in terms of business concepts and ensure predictable query generation.

Collapse Hierarchical Relationships:

There are often cases in normalized or snowflake data sources where several tables exist to describe a single business concept. Product is a very common example of this. For example, anormalized representation of Product includes three tables related by one to many relationships.Each Product Line has one or more Product Types.

Each Product Type has one or more Products.

An end user may or may not be knowledgeable about the relationship between the individual levels of product, also the necessity to expand and select a query item from each query subject in the model makes more clicks for the end user. A modeler can make the decision to create a model query subject for product that not only simplifies using Product for the purpose of ad hoc query and reporting but also presents the levels of the hierarchy in order to visually cue the end user on the relationship between the levels. If desired, the modeler can use query item folders to clarify which attributes apply to which level. In this example further clarification is not required.


Collapse Master/Detail Relationships:

Another common scenario in data sources is the existence of master/detail tables containing facts. A good example of this is order header and order detail. For the purposes of inserting and updating data, this structure is beneficial. For reporting purposes, however, the concept of Orders exists separately from the physical representation of the data and, as discussed in the previous section, this scenario can also lead to unpredictability in query generation.

In order to simplify the model in this case, it is better to create a model query subject that combines the foreign keys of both Order Header and Order Details and includes all measures at the Order Detail level.

III. Resolve Ambiguous Relationships

Framework Manager Modeling Guidelines

Cases of multiple relationships or recursive relationships generally imply that the data represented by a query subject can be viewed in more than one context or role and should be modeled accordingly.

Two common examples of ambiguous relationships are:

Multiple Valid Relationships –typically occur between dimensions and facts. Create a shortcut or model query subject for each role with a single relationship specific to the role.

Recursive Relationships – typically imply two or more levels of granularity. As a minimum create a shortcut or model query subject each for the parent and the child roles. For a deep recursive hierarchy, we recommend that the hierarchy be flattened in the database and that you model the flattened hierarchy in a single query subject.

An ambiguous relationship occurs where there are multiple relationship paths between one or more query subjects leaving multiple options for how to write a query. This is a situation that can be responded to by the modeler or in the database by the DBA. If appropriate, the DBA can choose to remove extra relationships (although this can potentially result in another situation that




(IV) DEFINE DIMENSIONAL INFORMATION

Framework Manager Modeling Guidelines

The primary purpose of dimensional information in Framework Manager is to prevent double counting. By specifying the internal cardinality or granularity of the data in a query subject, it is possible to enhance the model and allow the query engine to anticipate situations in which double-counting could occur.

When specifying dimensional information consider the following:

  • Identify the levels that are relevant for reporting purposes
  • Identify the key(s) for those levels and if those keys uniquely identify the members of their respective levels
  • Identify any attributes associated to levels.
  • Identify the hierarchy of the levels – the relationship between levels.
  • Multiple hierarchies may exist, it is recommended that these be explicitly modeled with additional query subjects.
  • Star style dimension tables are perfect candidates for dimensional information because they typically have more than one level and they include attributes that are associated to more than one level.

When and How to Use Dimensional Information:

Use dimensional information to specify the relationship between levels in a multi-level dimension.For example, there is a time dimension table that contains keys for days, months, quarters, and years. Day key is the primary key of the table, However, there are also keys for month, quarter and current_year, each of which can uniquely identify the data at their respective levels and could relate directly to facts in the database.

In order to define the behavior expected when querying at a one or more levels of time,dimensional information is used. Levels are defined for years, quarters, months, and days. A key is defined for each level and in this example, that key is sufficient to uniquely identify the level. A hierarchy is defined to specify the relationships between the levels: days roll up to months, months to quarters, and quarters to years. Attributes and facts can also be defined for each level.

Any attribute or fact that is not explicitly associated to a level will be treated by default as if it were associated to the lowest level (day).


When performing multi-fact queries between facts at different levels of granularity, dimension information on conformed dimensions ensures correct behavior when a multi-fact query is submitted and each fact is recorded for a different time period (daily versus monthly, for example). The query engine will use its understanding of the relationship between days and months from the defined dimensional information to ensure that data is rolled up correctly.

How to Avoid Double-Counting

There are several common scenarios that can lead to double-counting:

• multi-fact, multi-grain queries

• aggregate tables

• multiple hierarchies

Multi-Fact/Multi-Grain Queries

Multi-fact queries where de-normalized dimensions are related to fact tables on different keys

(and therefore levels). A de-normalized dimension table typically has internal cardinality – distinct levels of attribute data with keys that have a hierarchical relationship to each other.

Example: Multi-Fact/Multi-Grain Query with Dimensional Information

A multi-fact/multi-grain query is typically the result of multiple star schemas sharing conformed

dimensions but using keys for different levels of the same hierarchy. There is potential for double counting the since an aggregation is required to bring quantitative items from both fact tables to the same level of granularity for reporting.




The example above shows two fact tables sharing a time dimension and a product dimension. The Time dimension has four levels: Year, Quarter, Month, and Day. It has a relationship to Inventory Levels Fact on the Month key and to Sales Fact on Day key. The Product dimension has three levels: Product Line, Product Type, and Product. It has relationships to both fact tables on the Product key. A report on these four tables will, by default, be aggregated to retrieve records from each fact table at the lowest common level of granularity, in this case at the month and product level. Without specifying dimensional information on the time dimension, it is possible that incorrect aggregation could occur – for example monthly fact values could be rolled up based on the lower time level of days. By using dimensional information to specify that days roll up to months, months to quarters, and quarters to years, any request to aggregate based on time will ensure that days are rolled up to months.

§ Approach 1 cannot be used in the following scenarios:

If the query include summaries, then there could be a chance that due to multiplication or replication of the records incorrect calculation of summaries in either of the child elements of the Tabular SET and hence the 1. INTERSECT/EXCEPT functionality will fail to not mimic the EXIST/NOT EXIST functionality.

§ Approach 2 cannot be used in the following scenarios:

1. If the query includes an EXIST clause, then since functionality of EXIST clause cannot be implemented using OUTER JOIN, approach 2 cannot be used.

2. If the query has a NOT EXIST clause and if the metadata created to implement the functionality of NOT EXIST is not generic (i.e has any report specific user input filters in the metadata, then approach 2 will not be used.

§ Approach 4 will be used instead of approach 3 if and only if the SQL can be completely reused for another report of the same application (without the need to have any additional joins in the metadata).

(iii) Reports with queries having UNION/UNION ALL clause

Approach 1: Tabular Set

Report Studio Tabular Sets can be used to create reports which have UNION/UNION ALL queries. The tabular set is basically a relational set expression that combines two or more tabular structures like tabular model, tabular SQL and so on. A tabular set produces a single result set, which is the UNION/UNION, ALL of the tabular structures.

Approach 2: Tabular SQL

Report Studio Tabular SQL feature can be used when there is a need to create reports having queries with UNION/UNION ALL. The SQL statement may be expressed by using syntax recognized by the native database, or by using Cognos SQL syntax

Approach 3: Data source Query Subjects in Framework Manager

Data source query subject in Framework Manager can be used when there is a need to create reports having queries with UNION/UNION ALL clause. The SQL statement may be expressed by using syntax recognized by the native database, or by using Cognos SQL syntax. This query subject can be used in report studio to create reports.

§ Approach 1 cannot be used in the following scenarios:

1. If the individual SQL of the query cannot be implemented using either Tabular Sets or Tabular Models, then approach 1 will not be used.

§ Approach 3 will be used instead of approach 2, if and only if the SQL can be completely reused for another report of the same application (without the need to have any additional joins in the metadata).

(iv) Reports with SQL’s having Inline Queries

When a SELECT query is nested inside another SELECT, then it is an inline query.Approach 1: Tabular SQL

Report Studio Tabular SQL feature can be used when there is a need to create reports having inline Query. The SQL statement may be expressed by using syntax recognized by the native database, or by using Cognos SQL syntax.

(V) Reports where the query has user inputs in outer join

Approach 1: #prompt# in Tabular SQL

Macro function #prompt# can be used to define a parameter in the outer join definition in the Tabular SQL. The value to this prompt is set from the prompt page thereby mimicking the functionality of passing user inputs to the outer join.

Approach 2: #prompt# in Data source Query Subjects in Framework Manager

Macro function #prompt# can be used to define a parameter in the outer join definition in the FM Metadata. The value to this prompt is set from the prompt page thereby mimicking the functionality of passing user inputs to the outer join.

Rules:

Approach 2 will be used instead of approach 1, if and only if the metadata can be completely reused for another report of the same application (without the need to have any additional joins in the metadata).

(vi) Reports having complex logic (Unions with multiple save data, Complex Calculations, Loops, nested Conditions, etc).

Approach 1: Summary Table

Summary table can be created. This summary table can be joined with the required tables in order to pull out the report in the report studio. The data in the table needs to be refreshed periodically.

Note: Summary tables should be used only in the following scenarios:

If data retention/volume is less than 1million records.

Data in the report is not real-time / not near real-time.

User volume is high.

Approach 2: Stored Procedure

If the data in the report needs to be real time or near real time report or if the data retention is more than 1 million records, then SP approach would be considered. The stored procedure is defined in the FM Metadata and the report uses this stored procedure query subject to pull out the data. In some cases table variables might need to be used.

(vii) Report Query needs inputs from online applications/batch process

Approach 1:

Cognos 8 SDK can be used to pass parameters to the reports.

5. Performance Tuning

(I). Try to set the Processing property to Database Only. It runs faster than Limited Local.

(II)Try to use fixed column widths where possible. We have found that dynamic sizing sometimes runs queries twice--once to find the largest data content, then again to dynamically size the columns based on the largest data content.

(III) Try to move as many calculations as possible into the model so your query doesn't have to do them for every row of data pulled.

(IV) Try to use as many filters as possible up front to minimize the data you must pull in and process.

(V) Simple CASE statements run faster than Search CASE statements.

(VI) Place calculations strategically. Rather than include a calculation in a CASE statement in multiple places, do it once in a separate field and then refer to it in multiple places. This minimizes processing time.

(VII) Create logical and useful index fields and logical table structures to make searching and pulling the data as efficient as possible.

(VIII) When sorting a field, sort it either at the tabular model level OR the queries level but NOT both.

(IX) Where possible, use database functions for calculations instead of their equivalent Cognos functions.

(X) When using direct facts in the report do not create shortcuts, use directly in facts under Query.

(XI) Cognos configuration by default the font is Times new roman the best practices are saying change the font to Arial - it will use less memory


Design Approaches for Cognos Reports

Table of Contents

1.0 Purpose. 3

2.0 Scope. 3

3.0 Cognos Report Studio Approaches. 3

3.1 Reports having simple queries and direct table joins 3

Approach 1: Tabular Model 3

3.2 Reports with queries having EXIST/NOT EXIST clause 4

Approach 1: Tabular Set 4

Approach 2: Modify Metadata 4

Approach 3: Tabular SQL 4

Approach 4: Datasource Query Subjects in Framework Manager 4

3.3 Reports with queries having UNION/UNION ALL clause 5

Approach 1: Tabular Set 5

Approach 2: Tabular SQL 5

Approach 3: Datasource Query Subjects in Framework Manager 5

3.4 Reports with queries using Save Data tables 5

Approach 1: Nested Tabular Sets & Tabular Models 5

Approach 2: Refer to section 3.9 5

3.5 Reports with queries having IN/NOT IN clause 6

Approach 1: Parent/Child tabular element 6

Approach 2: Tabular SQL 6

Approach 3: Datasource Query Subjects in Framework Manager 6

3.6 Reports with SQL’s having Inline Queries 6

Approach 1: Tabular SQL 6

3.7 Reports where the query has user inputs in outer join 6

Approach 1: #prompt# in Tabular SQL 6

Approach 2: #prompt# in Datasource Query Subjects in Framework Manager 7

3.8 Reports that require multiple frames 7

Approach 1: Multiple frames in a page 7

Approach 2: Frames on multiple pages 7

3.9 Reports having complex logic (Unions with multiple save data, Complex Calculations, Loops, nested Conditions, etc). 7

Approach 1: Summary Table 7

Approach 2: Stored Procedure 8

3.10 Report Query needs inputs from online applications/batch process 8

Approach 1: 8

3.11 Reports having Inserts and Updates 8

4.0 Cognos8 SDK Approach. 8

5.0 Prompt Pages. 8

6.0 Auto Printing of Cognos8 Reports. 9

7.0 Imaging of Cognos8 Reports. 9


1.0 Purpose

This document details the various design approaches to be used in RSG for generating COGNOS reports.

This is a technical paper that explains different report complexities and the various design options available to achieve them using Cognos Report Studio. The document explains each option and weighs the advantages and disadvantages for each option.

This document is a compilation of various options that were thought feasible keeping in mind the current environment and as per the requirements for reporting.

2.0 Scope

The design approaches considered in this document include

Ø COGNOS Report Studio Approaches

Ø COGNOS 8 SDK approaches

Ø Prompt screen creation

Ø Auto Printing of Reports

Ø Imaging of Reports

Note: The approaches considered for a particular functionality / operational concept / process may result in trade-off on part of the functionality but will be performance optimal.

3.0 Report Studio Approaches

This section details the various design approaches to be used in creating reports using Report Studio. Also, each approach has been listed/depicted in the order of priority in which the design needs to be applied.

3.1 Reports having simple queries and direct table joins

Approach 1: Tabular Model

Report Studio Tabular Model feature can be used when there is a need to create very simple reports having direct table joins.

3.2 Reports with queries having EXIST/NOT EXIST clause

Approach 1: Tabular Set

Report Studio Tabular Set (INTERSECT & EXCEPT) feature can be used when there is a need to create reports having queries with EXIST/NOT EXIST clause.

Approach 2: Modify Metadata

In Framework manager query subjects with outer joins can be created to mimic the functionality of the SQL containing the NOT EXIST clause. These query subjects can then be used in the Report studio to create reports.

Approach 3: Tabular SQL

Report Studio Tabular SQL feature can be used when there is a need to create reports having queries with EXIST/NOT EXIST clause. The SQL statement may be expressed by using syntax recognized by the native database, or by using Cognos SQL syntax.

Approach 4: Datasource Query Subjects in Framework Manager

Datasource query subject in Framework Manager can be used when there is a need to create reports having queries with EXIST/NOT EXIST clause. The SQL statement may be expressed by using syntax recognized by the native database, or by using Cognos SQL syntax. This query subject can be used in report studio to create reports.

Rules:

· Approach 1 cannot be used in the following scenarios:

1. If the query include summaries , then there could be a chance that due to multiplication or replication of the records incorrect calculation of summaries in either of the child elements of the Tabular SET and hence the INTERSECT/EXCEPT functionality will fail to not mimic the EXIST/NOT EXIST functionality.

· Approach 2 cannot be used in the following scenarios:

1. If the query includes an EXIST clause, then since functionality of EXIST clause cannot be implemented using OUTER JOIN, approach 2 cannot be used.

2. If the query has a NOT EXIST clause and if the metadata created to implement the functionality of NOT EXIST is not generic (i.e has any report specific user input filters in the metadata, then approach 2 will not be used.

· Approach 4 will be used instead of approach 3 if and only if the SQL can be completely reused for another report of the same application (without the need to have any additional joins in the metadata).

3.3 Reports with queries having UNION/UNION ALL clause

Approach 1: Tabular Set

Report Studio Tabular Sets can be used to create reports which have UNION/UNION ALL queries. The tabular set is basically a relational set expression that combines two or more tabular structures like tabular model, tabular SQL and so on. A tabular set produces a single result set, which is the UNION/UNION, ALL of the tabular structures.

Approach 2: Tabular SQL

Report Studio Tabular SQL feature can be used when there is a need to create reports having queries with UNION/UNION ALL. The SQL statement may be expressed by using syntax recognized by the native database, or by using Cognos SQL syntax

Approach 3: Datasource Query Subjects in Framework Manager

Datasource query subject in Framework Manager can be used when there is a need to create reports having queries with UNION/UNION ALL clause. The SQL statement may be expressed by using syntax recognized by the native database, or by using Cognos SQL syntax. This query subject can be used in report studio to create reports.

Rules:

· Approach 1 cannot be used in the following scenarios:

1. If the individual SQLs of the query cannot be implemented using either Tabular Sets or Tabular Models, then approach 1 will not be used.

· Approach 3 will be used instead of approach 2, if and only if the SQL can be completely reused for another report of the same application (without the need to have any additional joins in the metadata).

3.4 Reports with queries using Save Data tables

Approach 1: Nested Tabular Sets & Tabular Models

Report Studio Tabular Sets & Tabular models can be nested to create reports that query direct Database physical tables and also have unions with ‘minimal save data(maximum of 4).Need to clarify

Approach 2: Refer to section 3.9

Rule:

· Approach 1 cannot be used in the following scenarios:

1. If there is a join between the save data tables(temp tables) themselves, then since ReportNet treats join between nested tabular elements as CROSS JOINS, approach 1 cannot be used.

3.5 Reports with queries having IN/NOT IN clause

Approach 1: Parent/Child tabular element

A Parent / Child tabular element combination can be used to create reports having queries with IN/NOT IN clause. The child tabular element will provide the range of values against which the corresponding value of the parent tabular element is compared with an IN/NOT IN clause.

Approach 2: Tabular SQL

Report Studio Tabular SQL feature can be used when there is a need to create reports having queries with IN/NOT IN clause. The SQL statement may be expressed by using syntax recognized by the native database, or by using Cognos SQL syntax.

Approach 3: Datasource Query Subjects in Framework Manager

Datasource query subject in Framework Manager can be used when there is a need to create reports having queries with IN/NOT IN clause. The SQL statement may be expressed by using syntax recognized by the native database, or by using Cognos SQL syntax. This query subject can be used in report studio to create reports.

3.6 Reports with SQL’s having Inline Queries

When a SELECT query is nested inside another SELECT, then it is an inline query.

Approach 1: Tabular SQL

Report Studio Tabular SQL feature can be used when there is a need to create reports having inline Query. The SQL statement may be expressed by using syntax recognized by the native database, or by using Cognos SQL syntax.

3.7 Reports where the query has user inputs in outer join

Approach 1: #prompt# in Tabular SQL

Macro function #prompt# can be used to define a parameter in the outer join definition in the Tabular SQL. The value to this prompt is set from the prompt page thereby mimicking the functionality of passing user inputs to the outer join.

Approach 2: #prompt# in Datasource Query Subjects in Framework Manager

Macro function #prompt# can be used to define a parameter in the outer join definition in the FM Metadata. The value to this prompt is set from the prompt page thereby mimicking the functionality of passing user inputs to the outer join.

Rules:

· Approach 2 will be used instead of approach 1, if and only if the metatdata can be completely reused for another report of the same application (without the need to have any additional joins in the metadata).

3.8 Reports that require multiple frames

Approach 1: Multiple frames in a page

It is possible to have multiple list frames in a report page with data from different queries. It is also possible to conditionally hide or show the frames if required by the report specification.

· If the report has different page break conditions for each frame, then the approach is not fixed.

Approach 2: Frames on multiple pages

In this approach, only one frame is put on each page. When the report is run, the pages appear sequentially.

· If the report has different page break conditions for each page, then the approach is not fixed.

· If the report requires that one or more of the frames be conditionally hidden, then the approach is not fixed.

Rules:

· If the frame 1 and frame 2 appears in the same page, approach 1 shall be used.

· If the consecutive frames needs to get generated in a new page,approach 2 shall be used.

3.9 Reports having complex logic (Unions with multiple save data, Complex Calculations, Loops, nested Conditions, etc).

Approach 1: Summary Table

Summary table can be created. This summary table can be joined with the required

tables in order to pull out the report in the report studio. The data in the table needs to be refreshed periodically.

NOTE: Summary tables should be used only in the following scenarios:

Ø If data retention/volume is less than 1million records.

Ø Data in the report is not real-time / not near real-time.

Ø User volume is high.

Approach 2: Stored Procedure

If the data in the report needs to be real time or near real time report or if the data retention is more than 1 million records, then SP approach would be considered. The stored procedure is defined in the FM Metadata and the report uses this stored procedure query subject to pull out the data. In some cases table variables might need to be used.

3.10 Report Query needs inputs from online applications/batch process

Approach 1:

ReportNet SDK can be used to pass parameters to the reports.

3.11 Reports having Inserts and Updates

Approach not available/not known.

Types of inserts and updates to be handled:

Ø User inputs updated to table.

Ø Update flags or dates based on report run.

Ø Update report data to table.

4.0 ReportNet SDK Approach

ReportNet is a Web product for creating and managing reports. The ReportNet Software Development Kit (SDK) provides a platform-independent automation interface for working with ReportNet services and components.

For RSG, ReportNet SDK will be used to connect to the ReportNet server and

Ø Invoke ReportNet reports from Prompt web pages

Ø Auto print ReportNet reports as PDF to Virtual Directory

Ø Save ReportNet reports as PDF to a physical location for imaging.

5.0 Prompt Pages

ASP .NET Page will be used to create Web Prompt pages. This will then use ReportNet SDK to connect to the ReportNet server and invoke ReportNet reports.

6.0 Auto Printing of ReportNet Reports

ReportNet SDK will be used to print ReportNet Reports to Virtual Printer as PDF. A third party auto printing tool ‘Portal-Sphere® Commander’ will then pick up the PDF from spool and distribute the reports to different locations. This tool also has built in features to print Banners.

NOTE:

· Development of interfaces (ex: templates, banners & forms) if any between Cognos and Portal-Sphere® Commander is not within the scope of RSG.

· Creation and maintenance of folders for the reports and archive / delete facilities for the folders are not in scope of this RSG.

7.0 Imaging of ReportNet Reports

A third Party tool ‘OnBase’ is used to image reports. This tool requires report output to be both in PCL/formatted text & PDF format. PCL/formatted text output is used for full text search & indexing.

ReportNet SDK will be used to save the ReportNet Report as a PDF to a physical location as well as to print the same to a Virtual Printer.

The auto print tool Portal-Sphere® Commander would then pick up the report from the virtual printer and save it as a PCL/text format onto the physical location.

The onBase imaging tool would then pick up both the PCL/formatted text as well as PDF files for imaging.

7.1 Golden Rules for simple and successful Report Development


1. Local Processing: In all queries, turn local processing off whenever possible - i.e. set up for Database Processing only - this forces work to be done in the database and if we've defined reporting tables properly will always be viable option

2. Auto Summarisation: In all queries which are putting one record out in the report per database record, always turn the Auto Summarise option for the query to No (default is Yes)- this can make a huge difference to query performance and complexity when picking up lots of fields, as otherwise the SQL consists of a mass of SUM() and MAX() and then GROUP BY for all dimensions/attributes - unnecessarily so. Again, in the majority of cases, we'll be using one record per output row so this is generally going to work well.

3. Setting Sizes - especially heights: Don't try and control sizes when you don't need to - particularly heights. It can be good practice to control the width of various columns sometimes to create a level of symmetry and in particular to control widths when headings have multiple words, or in tables that need to mutually line up - but in general web based apps should be allowed to do what they need to do to fit the output window (or paper) as best they can. Controlling heights is particularly messy and should rarely be necessary in multirow reports. There WILL always be a better way with the powerful alignment, padding and margin settings

4. Using our traffic light images: Be careful around images - our standard traffic light and arrow images are the right size to line up with our report text standards BUT you should make sure that they are padded 0px above and 0px below, and that the text items on the row are set to middle for vertical alignment. This allows the image to dictate the height of the row and everything to line up properly across a row. You should also ensure that the default padding for the whole row is set to either 1px above and 2px below or vice versa - then if the image is not displayed, the height is still ok

5. Controlling when objects appear or are hidden: Quite often it is necessary to control when an object appears and when it doesn't. If this is a simple yes or no, always use the rendering control rather than conditional blocks/formatting - much simpler and less hassle within report studio. If the display should be on 'no' create a second variable. Conditional blocks are generally more relevant when trying to remove a column altogether so that when not displayed there is no width (typically drill through hyperlinks)

6. Report Expressions vs Query Expressions: report expressions are quite limited in terms of functionality and construction - generally better if constructing something to display to do it in the query and use the query variable (in our older Branch InSight applications all images were typically defined as report expressions - easier now to put the full value into an item in the query subject in Framework Manager).

7. Tables are your friend: You really need to be comfortable with tables within tables within tables as a way of laying out reports which align multiple elements with the developer really in control. They can go anywhere - in list columns, in headings, on the background (and list controls should generally always sit within a table cell so you can add items above and below the list). There is no overhead with tables and they are a great way of keeping control of output if used well. Additionally, tables can be used in single cut and paste operations to replicate their content - table cells etc can't. And remember, when working within table cells, always set the vertical and horizontal alignment the cell to control what happens if the objects within the cell don't fill it - again, take control of the output. You can set cell attributes for a wide range of cells in a table by control-clicking on opposite corners (a great step forward from ReportNet!).

8. Tables can be your enemy: However, if you lose control of tables things can get into a real mess!!!! In particular, remember that the default width for tables is 100% of their parent or container object. This is generally desirable 'within' other tables and list columns and the like - however at the outer levels it is almost certainly something to delete and leave the width setting to blank. The table (and/or list) will then size correctly to be as wide or narrow as it needs to be rather than stretching unnecessarily.

9. Set formatting at the highest level: If you do have to override the default formats in a report and in list controls etc, do so at the highest possible level (eg table cell rather than every text item in the cell, and via the List Columns Body Style and List Columns Title Style options rather than for each individual column or heading) - also includes padding, alignment, border settings as well as colour and font etc. This simplifies your life as a developer, means that if new objects are added or columns included they inherit the correct style and will keep the size of the html passed into browsers down............

10. Keep it simple! Two basic elements here - on the data/query side put the complexity into the actual data if the complexity really is essential, or by second choice into the model, but keep it out of the reports; and on the report pages - avoid the use of Javascript or other complex solutions as they will be difficult to maintain and will almost certainly be a problem during Cognos upgrades - exception being the centrally provided and supported elements such as the 'Select Branch' prompt. The data/query elements can also be a problem at upgrade time if we complicate them - certainly was from ReportNet to Cognos 8 around sorting and the like

Number 11 is always know what your queries are doing - if the generated SQL is complicated then there is almost certainly something wrong with the model and/or the query!