IBM Cognos and Motio Best Practices Blog

Locate and Mass Update Fonts in ALL your Cognos Reports, Quickly and Easily

Posted by Sammy Ng on Wed, Aug 08, 2018 @ 11:08 AM


Imagine your organization has decided to update their brand, and you’re tasked with updating the fonts on ALL company-wide reports that aren’t Arial or Helvetica with Arial. But how would you proceed to accomplish this herculean task? The average Cognos customer has between 10,00 and 15,000 reports in their production environment. So you would have to dive into tens of thousands of reports and manually edit each and every one! MotioPI Pro provides a more efficient method for mass updating all your Cognos BI content. Here is a look into how to update your fonts.

What are regular expressions

A regular expression (regex or regexp) is a special text string that can help you match, locate, and manage text. Regular expressions may seem puzzling at first glance, but once mastered you can save hundreds of hours by avoiding the tedious process of manually searching for text. Here, I will show you how to use MotioPI Pro Search & Replace panel to find all fonts with the exclusion of Arial and Helvetica and update your fonts to be Arial.

Using Search & Replace Panel

The Search & Replace panel allows you to mass update content within the Content Store (reports, queries, analysis objects, etc.) and outside the Content Store (XML files, CPF files, etc.). To begin, open MotioPI Pro.

1. Click on the “Search & Replace” located on the left-hand panel.

MotioCI_search_and_replace
Click to enlarge

2. Under the “Search & Replace” tab, you will see the “Query for:” drop-down menu. Click on the drop-down menu and select “Report”. This drop-down menu will set the type of Cognos object that you want to examine in MotioPI Pro.

MotioCI_search_and_replace_menu.
Click to enlarge

3. In the “Options” box, select “Skip overlapping occurrences”. This will provide us with a clear view of every original regular expression.

MotioCI_skip_overlapping_occurences
Click to enlarge

4. In the “Search” and “Replace” section, we will input the following commands:
*Make sure the regular expressions ([a-z]*) checkbox is selected.*

MotioCI_search_and_replace_terms-1
Click to enlarge

The first row will search for fonts within quotations and replace them with Arial font. The second row will replace fonts with Arial that are not already Arial with Helvetica. The brackets surrounding our search terms will be referenced and replaced by our replacement terms.

MotioCI_search_fonts
Click to enlarge

5. Below the “Search” and “Replace” columns, click on “Search” to locate all the reports that contain our search terms.

MotioCI_locate_fonts
Click to enlarge

6. Once the search has been completed, click on the checkbox on the left of “Name” to select all your reports. Below, you can select an individual report to see a preview of the search terms and their locations.

MotioCI_search_terms_preview
Click to enlarge

7. To begin replacing our search terms, select “Preview”.

MotioCI_preview_search_terms
Click to enlarge

8. In the “Preview” window, you can double-check the changes before they are finalized to your reports. To confirm your changes, click on “Replace” in the bottom right corner.

MotioCI_replace_search_terms
Click to enlarge

9. Now all of the reports that met the search criteria have been replaced with the Arial font.

MotioCI_successful_replacement
Click to enlarge

MotioPI Pro helps ease the burden of implementing new brand changes across your Cognos assets. With MotioPI Pro, you can mass update the fonts in your Cognos reports and other Cognos content in an instant! Click here to learn more about the features that MotioPI Pro has to offer.

Watch the  MotioPI Pro Demo

 

Tags: getting started with MotioCI, IBM Cognos, cognos change management, Cognos Analytics