One of the goals of the Cognos Framework Manager modeler is to build a model that makes report authoring easier. To accomplish that, you “build in” business logic” (a loosely defined term here) into your meta model.
This business logic can be simple (like simply renaming or hiding a database table column) or quite complex (like modifying SQL commands to return only specific data from a datasource).
Some of the basics you can add to your model are:
- Stipulating attributes
- Renaming or hiding database columns
- Adding prompts
- Applying filters
- Creating calculations
- Adding formatting to data items
- Using folders and namespaces for grouping information
- Using shortcuts to include the same information in different places
Let’s explore a few of these.
Stipulating Attributes
A simple example is changing the attribute type of an imported database column. This is done for various reasons, but manly to dictate how Report Studio deals with the data in a report (for example, Report Studio may attempt to sum numeric fields which may, depending upon the database column, be a meaningless number).
An example (from my demo project) would be the ProductID field in the Products table (imported from SQL Server).It is imported as a FACT field (since it is defined as a numeric in the database table). To change this field’s attribute, I:
Select the database field (by clicking on it) and in the Framework Managers “Properties Pane” (hint, if you can’t find the properties pane, go to “view” on the FM menu and click Properties to make it visible), I locate the property “Usage”. There, I can change the attribute:
Renaming or hiding database columns
This is even easier. If you’d like to rename a database column (to something more “user friendly”) or perhaps hide it (for example, we don’t want to display Salary information to the report authors), you can just:
- right-click on the database column in the Framework Manager Explorer column and select (from the popup menu) “rename” or
- back in the properties pane, change the “Is Hidden” property to TRUE (to hide the column)
Applying filters
Filters are neat. For example, my demo includes a database table named Employee. Right now, the meta model includes all records (all employees) in the table. That would include both active and inactive employees. I want to make sure that reports only use active employees, so I can alter the FM query (to apply a query filter) to accomplish this:
- Double-click on the table name Employee (in the FM explorer pane).
- FM shows me the “Query Subject Definition” dialog.
- Edit the SQL (hint: use the Validate button).
- Click OK.
And so on. You can see that Cognos Framework Manager makes it easy to build out your meta model with your business logic but to be sure, the real work here is to identify what logic to include and obtain consensus from your business stakeholders on the correctness of the logic.
Until next time…