Transcript
Page 1: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3

April 2009

Page 2: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 1

Contents Logging-in for the first time ...................................................................................................................... 2

Cognos Connection ....................................................................................................................................... 4

Cognos Connection Basics ........................................................................................................................ 4

My Preferences & Portal Tabs .................................................................................................................. 5

Pages ......................................................................................................................................................... 7

Organizing Reports and Folders .............................................................................................................. 14

Scheduling Individual Reports ................................................................................................................. 14

My Activities and Schedules ................................................................................................................... 17

Scheduling Jobs ....................................................................................................................................... 18

Report Views ........................................................................................................................................... 21

Query Studio ............................................................................................................................................... 23

Query Studio Basics and Inserting Data .................................................................................................. 23

Filtering Data ........................................................................................................................................... 27

Exporting Reports ................................................................................................................................... 32

Formatting Data ...................................................................................................................................... 33

Calculations ............................................................................................................................................. 33

Summaries .............................................................................................................................................. 35

Conditional Styling .................................................................................................................................. 37

How to Create a Crosstab ....................................................................................................................... 40

Page Breaks ............................................................................................................................................. 43

Using Slotted and Addresses by Rule Views ........................................................................................... 45

Slotted Views ...................................................................................................................................... 45

Address by Rule View .......................................................................................................................... 46

Creating Charts........................................................................................................................................ 46

Page 3: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 2

Logging-in for the first time

1. Go to the ERP Link Page 2. There are three links of interest when using Cognos:

o Cognos for Test Database-TEST o Cognos for Production Database o ODS Meta Data

Page 4: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 3

3. When you click on a Cognos link, supply your credentials (your EC network username and password)

4. After you have put in your credentials, you arrive at a Welcome screen similar to the one

pictured below:

5. You will primarily be using Cognos Connection and Query Studio. Also, to save you a step when logging in, uncheck the box "Show this page in the future". This will automatically take you to your Cognos Connection Home Page.

Page 5: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 4

Cognos Connection

Cognos Connection Basics

When you arrive in Cognos Connection, you are on your Home Page. This is the default location you are directed when you first log into Cognos Connection, but can be changed according to an individual's needs. To change your home page, navigate to the new page, click on the Home Options drop down box next to the blue house icon and select Set View as Home.

Portal Tabs- pages or locations within Cognos that a user can navigate to simply by clicking on the tab

Home- clicking on the blue house icon will return you to your designated Home Page Search- can be used to find folders and items within either Shared or My Folders Package- designed to be places to save reports based on their package designation, but can hold

any report or item. Security is typically enforced by package. Report Folder- collection of reports and other items regardless of their package assignment

(typically used for a functional group that can access more than one package).

Within the toolbar, there are functionalities that affect both the current page and to any selected folders or items (such as reports).

Page 6: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 5

Below is a listing of each Toolbar button:

My Preferences & Portal Tabs

Cognos Connection can also be tailored to an individual user's needs. These personal preferences affect the "look and feel" of Cognos Connection and are only applicable to the individual user.

1. To access these controls, click on the "My Area" drop down box in the top right hand corner of Cognos Connection and then select "My Preferences".

Page 7: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 6

2. You will see 3 tabs at the top of the screen- General, Personal, and Portal Tabs. The General tab, the default screen when you enter My Preferences, is where a user can change the appearance of the view styling and Portal views. The second tab is your user information as provided by the system administrator.

3. Lastly, by clicking on the "Portal Tabs" on the top of the screen, you can add, remove, or modify the sequence of the Portal Tabs that are displayed in your Cognos Connection. Be sure to have already Added a New Page before trying to add a new portal tab. To add a new portal tab, click on the "Add…" button.

Page 8: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 7

Pages

A page is a collection of information that is displayed to the Cognos User. By default, you're used to seeing it as where you can access existing reports. But you can create your own page that may have your favorite report ready to run, or of a particular folder that you frequently access. You can even embed other content such as websites within a page.

1. To start things off, let's go ahead and create a new page. Click on the "New Page" button on your toolbar.

2. Now, let's give the page a name. For this example, I called it "Justin's Page." You will also notice at the bottom of this screen is the location of where this page will be saved with the Cognos directory. If you are creating an individual page, save it in your "My Folders". If you plan on sharing it to other users, save it in a shared folder. For this exercise, because I am creating a page for only me to view, I am going to save the page in a "Sample Reports" folder within "My Folders". Then click "Next".

Page 9: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 8

3. The next screen is where you select the layout and the content of your page. For this exercise, I am going to have a two columned page: one for a webpage, the other for a Cognos Report I frequently use. Click on the "Add…" button on either column.

4. The first step is to select which type of portlet you would like to use. We are going to first select Cognos Content.

Page 10: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 9

5. Cognos Content contains three functions: a Navigator for browsing through Cognos Connection folders, a Search function for finding folders and items, and a Viewer that allows reports to be run within the page. Select the Cognos Viewer and add it to the Selected Entries. Then click OK.

6. Repeat the same steps for the other column, but this time go to Cognos Utility and select HTML Viewer.

7. Once you are done setting the column content and the layout, click "Next". You will now be at the Page Style portion of the page setup. This is where you can give the pages viewable titles and change certain viewable features on the page. Then click "Next" again.

Page 11: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 10

8. You will be given an option to select an action: to add the page to your portal tabs and/or view the page. For this exercise, check both options. Then click "Finish"

9. Great job! You've set up the page! But wait… there's nothing in the columns! How could this be? That's because once you've set up the page, you need to set up what each portlet is going to do.

10. First, let's edit the HTML viewer portlet on the right column. Click on the edit icon.

11. For this exercise, we are going to put the Emerson College homepage in the HTML viewer portlet. Let's use a title of "Emerson Homepage" and type in the URL address http://www.emerson.edu. You can specify the height of the portlet in number of pixels. For this exercise, we will put the height at 400 pixels. Then Click OK.

Page 12: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 11

12. When you get back to your newly created page, you should see the most updated version of the EC homepage. Now let's set up the Cognos Viewer. Click on the edit icon on the 1st column to edit the Cognos Viewer.

Page 13: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 12

13. For this exercise, I am going to use a report called "Recent Graduate Applicants" that I had already created. Put in a title for the portlet then click on "Select an entry…"

14. Navigate to the report that you would like to, select it and click OK.

Page 14: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 13

15. There are additional properties you can set for the report entry by click on the “Edit Properties” link next to the report.

16. You will notice when you get back to your page that the report is there. If there are parameters answered by prompts in your report, you will have to answer them when the page loads.

Page 15: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 14

17. If at any point you want to access the report (for exporting to PDF or Excel for example) click on the maximize button within the portlet. You can also enable the Normal Toolbar by clicking on the Advanced Edit Properties of the report.

18. If you didn't want to add the page to your tabs originally or you would like to edit the sequence, you can edit this in My Preferences.

Organizing Reports and Folders

A few tips/best practices for organizing your reports and folders:

1. Don't ever worry about not being able to find a report- you can always use the search feature to find an item

2. Organize based on what will take the fewest amount of steps to access the data then by topic. For example, you should organize your reports in a "Daily Tasks" folder so that they are separate from all other reports (this is particularly important if and when you want to schedule reports or schedule jobs)

3. If you have access to Report Studio, always keep your drill through reports together, in a separate nested folder that is clearly labeled for drill through use only. This will avoid a user from accidently trying to run the report.

4. Always try to share reports- avoid keeping reports in your "My Folders." This will prevent duplicative efforts and if you make a great report, why not share it?

5. Another reason to share reports- even if you put it in a shared folder, only staff that have access to run a report from its respective package can actually see the data. So a report that the whole word can click on still can't be accessed unless that user has been given access to the package.

6. A last reason to share reports- it is much easier, cleaner, and less confusing to apply security/permissions to folders rather than to individual reports.

Scheduling Individual Reports

Scheduling reports to run can be particularly beneficial, especially because the ODS is only refreshed nightly. If there are reports you tend to run every day, it's more efficient to set it up to run early in the morning, before you get into the office. Rather than wait for the report to run… why not have the report waiting for you!

1. Click on the "Schedule" button under Actions for the report

Page 16: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 15

2. Set the Frequency, Start/End Dates, and whether you want to override the report options or prompt values. You can also set the report to send an email to one or more recipients after completion.

3. If at any point you want to disable scheduling for a report, check the "Disable the Schedule" box. 4. Click "OK" when finished. 5. Then go to the "Set Properties" button under Actions for the report

Page 17: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 16

6. At the bottom of the General tab page, you will see two options: one for Run history, the other for Report output versions. The Run history records how many occurrences to log. The report output versions are the actual, viewable reports that have run in the past.

o You can either specify the number of occurrences for each to keep or the duration. If you specify the number of occurrences, it is recommended that the Run history be greater than or equal to the number of occurrences for Report output versions.

7. Click "OK" when finished 8. After a report scheduling has completed, you will notice an additional button under the report

Actions for "View the output versions for this report"

9. You can view and manage (e.g. delete) the previous output versions of the report from this screen:

Page 18: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 17

To administer all of your scheduled reports from a centralized console, you have to use My Activities and Schedules.

My Activities and Schedules

In addition to scheduling individual reports, users have the ability to administer all of their reports from a single console.

1. In the top right-hand corner of Cognos Connection, click on the My Area drop down box then select My Activities and Schedules.

2. The first tab, Current Activities, displays currently running reports. From here you can input a period or range to search for report activity. There is also a summarized graph of the activities at the top of the tab. For previous run reports, click on the Past Activities tab. In the list at the bottom, you can view both the history and the report output versions by clicking on the drop down blue arrow to the right of the report title.

3. The third tab labeled as “Upcoming Activities” shows reports that are pending and waiting to run.

4. The fourth tab labeled "Schedules" is where you can administer enabled and/or disabled scheduled items. You can select multiple items by checking the boxes on the left and enable/disable the items using the icons in the top right hand corner of the screen. You can also

Page 19: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 18

perform item actions, including running a report once to add it to the previously run history by clicking on the blue drop down arrow to the right of the report name.

Scheduling Jobs

A job is a grouping of other executable items, such as reports or report views. A Job is useful in that you can manage multiple executable items at the same time, rather than individually. If you had 15 reports that you ran on a daily basis, you could group them into and schedule a job, rather apply scheduling to 15 items.

1. In this example, we will create a job that processes two reports: Recent Graduate Applicants and Recent Undergraduate Applicants. First click, on the "New Job" icon.

2. Next, give your job a name and a location. In this example, we will call the job "Daily Email Applicant Blast" and keep it within My Folders. Then click the Next> button

Page 20: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 19

3. On the "Select the Steps" screen, you can define the steps in which the job executes. This is useful if one report is dependent on another. Click on the "Add" button for attaching reports to the job.

4. On the "Select entries (Navigate)" screen, you can add reports to the job to be executed. To add, check the desired reports to be executed and click on the green arrow to attach them to the job. Remember, you can add any reports to the job that you have access to and a report can belong to more than one job. In this example, we will select Recent Graduate Applicants and Recent Undergraduate Applicants. Once you have finished selecting the reports you would like to be executed as part of the job, click the "OK" button.

Page 21: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 20

5. You can also change the default report values or actions by clicking on the "Set…" button.

6. Expand out the "Report Options" link and check "Specify default values for all the reports of this job". This will enable you to govern the report actions and outputs for all reports within the job. In this example, we will "Send a link to the reports by email" by checking its box. You can also edit the email content by clicking on the "Edit the email options…" link. After you are complete, click on the OK button.

7. The second to last step you have to do is to save the job. You have the option also of running the job once after save or like in this example, to Save and schedule the job.

Page 22: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 21

8. We've now reached the point where we can schedule the job. For this example, we will have the job run every morning at 6:00 AM starting on April 16th. Click OK when you are finished.

Report Views

A Reporting View is a separate representation of a report that can have its own properties and characteristics. Instead of making duplicate reports that are essentially the same, you can create a report view of a query/report and change its schedule, prompt values, and results formats.

1. Under the Actions column for your query, click on the Report View icon

Page 23: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 22

2. Name your Report View. It is a good idea to name it with a standard naming convention (e.g. –

Report View – Query X – PDF Format)

3. Click Finish.

4. When you are back in Cognos Connection, click on the Properties icon for your newly created

Report View.

5. Click on the Report View Tab.

6. At this point, you can change the default action, report options, and/or set prompt values. In

this example, we set the Report View to export to PDF and select only Fall 2009 for the

Academic Period. Notice that the Prompt for Values box is checked: this will prevent the query

consumer from getting a prompt and automatically only receive Fall 2009’s.

Page 24: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 23

Query Studio

Query Studio Basics and Inserting Data

Query Studio is the primary tool used by business users to retrieve their data from Cognos. But how do we get started? To kick things off, if you're already in Cognos Connection, click on the Query Studio icon in the top right hand corner. You can also get to Query Studio by clicking on the pen icon

under Actions for a particular report or by clicking on Launch drop down box then selecting Query Studio.

If you used the Launch – Query Studio from the top right hand corner, you will have to select the package you will be working with. Once you arrive in Query Studio, you will arrive to a blank interface similar to the one below. All of Query Studio can be organized into four main areas: the Menu (and its displays), the Toolbar, the Work Area, and the Source tree.

Page 25: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 24

The Menu has 5 displays that correspond to each step towards creating a report within Query Studio:

o The Insert Data display, the default when you launch Query Studio, shows the Source tree as organized in the Cognos package.

o The Edit Data display is primarily for filtering and sorting the data that has been inserted into the Work Area.

o The Change Layout display allows the selected data to be grouped, organized, and formatted according to your report's requirements.

o The Run Report display is for deciding which format the report should be run (exported into). It is also for determining how much data is queried when creating the report.

o Lastly, the Manage Report display is primarily for saving and creating new reports.

Within the Source tree, there are four levels:

1. The highest level is called the package. These are organized in a logical manner based on the different types a report a business user may need to run. Security protocols are performed by which package you are able to access. These also correspond with each ODS Business Concept Diagram. Joins are predetermined within the package so that you only have to insert data into the report. Note: queries can only have one associated package.

2. The second level is known as the namespace. Each package should have 3-4 namespaces: one for the package and up to 3 additional supplemental namespaces (Person Supplemental, List of Values, and ODS).

3. Each namespace is composed of one or more query subjects. These correspond with each reporting view that you can click on within the ODS Business Concept Diagrams.

4. Within each query subjects are many query items (you may also have a right angle ruler icon for measures which are calculations performed by Cognos). This last level contains the individual columns of data that you will put into your report.

Page 26: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 25

Now that we are all speaking the same lingo, let's start putting in some data. There are 3 ways you can put data into the Work Area: 1) single click on one or more query item(s) then click the green insert button at the bottom of the Menu, 2) drag the query item(s) into the work area, or 3) double click on the query item. You can also drag over entire query subjects if you like.

In this example, we have added two columns to the report and Cognos has added a footer for summary information. Query Studio has a feature called Auto-Aggregation. This feature automatically aggregates measures as they are added to the report and presents the summaries in the report footer. Now let's edit the title of the report. You can either double click on the Title area or go to the Change Layout Menu display and click on "Edit Title Area."

Page 27: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 26

One more tip regarding Query Studio: you've probably noticed that if you have a lot of records in a given query item or have many query items in your report. Every time you add another column to the report, Cognos has to retrieve another entire set of data on top of what you already have, requiring additional time and resources. When you are authoring a report, you should switch the data view from Run with All Data to Preview with Limited Data or Preview with No Data. You can then run the query for all data after you have added your desired columns, formatting, grouping, etc. To change the run settings, go to the Run Report Menu display and select either Run with All Data, Preview with Limited Data, or Preview with No Data. Below is an example of a report preview with no data. The information in the columns corresponds with each query item's data type.

Page 28: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 27

Filtering Data

Now that we have a report title and some data columns to work with, we will want to filter for only certain values. Filtering, or selecting data, will be your primary means of finding the precise information you are looking for.

1. Select a column that you would like to filter on (in this example, Academic_Period_Desc). You can filter based on that column by clicking the yellow filter icon in the Toolbar, under the Edit Data Menu display, or by right-clicking on the column in the report area and selecting "Filter…"

Page 29: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 28

2. There are 3 primary ways of filtering data: picking from a list, searching for then selecting values, or typing in values. To change between the three methods, click on the buttons in the top right hand corner of the Filter dialogue box.

o Picking from a list involves Cognos going through the column looking for all distinct values. Keep in mind, you can choose to "Show only the following" or "Do not show the following" depending on what your report requires. In this example, we are looking only for applicants that applied for Fall 2009.

Page 30: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 29

o You can also search for values from within the column. One caveat to selecting from a list is that if there are many data records within the column, compiling the list of possible values may take some time. In addition, you may also not know the exact spelling of a value.

o Your last option is to type in a value without selecting an existing value. This is important when searching for values that you know are in the ODS but don't want to have to wait for the list to compile. It could also be used for filtering on future values that may not be in the ODS currently.

Page 31: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 30

3. You may also want a user of the report to filter the data independently. This is called prompting. On any of the filtering types, you can check the box for "Prompt every time the report runs" so that any subsequent executions of the report will start with a prompt asking for data parameters.

Page 32: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 31

4. Lastly, you may need to address missing values from your report. Otherwise known as NULL values, you have the option of including missing values, leaving out missing values, or showing only missing values. This is an important feature also for checking data quality.

Page 33: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 32

Exporting Reports

Anytime you need to print your report or send your report to another staff member that does not have access to Cognos, you will need to export the report into another format. Query Studio allows you to export a report into 4 different formats: PDF, Microsoft Excel (2007, 2002, or 2002), CSV (Comma-Separated Values), or XML.

To export a report from Query Studio, go to the Run Report Menu display and select the desired format.

Please Note: As soon as you export your report, remember that the data is only valid until the ODS refreshing again (every night). As your data is obsolete once the ODS refreshes, denote on your exported reports that it is "as of" a specific date. If you have a report that you want to differ slightly (such as with its own properties, prompt values, schedules, results), you can elect make a Report View of the report.

Page 34: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 33

Formatting Data

Cognos has many defaults built into the system, one being the formatting of data. In this example, we've added a date/time field called "Application Date." Let's say we want to format the date to different masking (i.e. 12/16/08). You can either 1) right click on the column and go to Format Data or, 2) go to the Edit Data Menu display and go to the same icon. From there you can format the column according to preset categories and types. You can also change the column headers by double clicking in the blue column headers or going to the Edit Data Menu display and go to Rename Column Header.

Calculations

Query Studio will automatically calculate measures' sums for the overall report total and per groups/sections. Very often however, you will find that you need a calculation that is not available in the ODS or generated automatically from Query Studio. What do you do then? It wouldn't be feasible to enter every possible measure or calculation that you may need into the ODS: because you don't know what you will end up needing! This is where calculations can come in handy. These are report-specific, custom functions that can offer different perspectives on your data.

In this example, we are trying to create an accounts list that has only the last 4 digits of a person's Social Security Number in it.

Page 35: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 34

1. Add in the TAX_ID column 2. Click on the TAX_ID column in the work area, then the green 'Calculation' button

3. Change the operation to 'Last characters' for the Report item: TAX_ID, the number of characters = 4. Give the item a name "Last Four Digits of SSN"

Page 36: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 35

4. You will then get a column in the work area for the last four digits of the SSN. Then, delete from the work area the original TAX_ID column

Summaries

Query Studio has the ability to summarize measures automatically based on the sum of the data, for grand totals and totals per group/section. What would you do if you didn't want to see sums? What if you want to see an average rather than total in the summary footer?

1. We’ll start with a list of applicants and with their current ages. For this example, we will want our Summary Footer to be the average age of the applicants, rather than the total age.

Page 37: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 36

2. Next, right click on the column that you want to change the summary, and then click on the

yellow Summarize icon . You can also click on the Edit Data menu and click on Summarize.

3. Then, change the Summary of the footer from Total to Average. Then click OK.

Page 38: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 37

4. You should have a result that looks something like this:

Conditional Styling

In addition to creating a report with necessary information and summarization, you may want to format a cell based on specified variables. For example, you may want to highlight a cell if it indicates a credit on account in one color, but a different color for a balance. In this example, we will color-code the background of Current_Ages based on their values.

Range Color

0-18 Red

19-29 Blue

30+ Green

1. Start with a basic report that has differing values in one of its columns (in this case, current ages)

Page 39: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 38

2. Click on the column that you would like to conditionally style (in this case, the Current_Age column). Click on "Change Layout" on the left-hand Menu bar. Then click on "Define Conditional Styles."

3. It is important to remember that the data type of the column you would like to highlight will determine what kind of values you can enter for conditions. Because we are using a Current_Age, we will be required to specify a range of values. Enter a new value of 17 then hit insert. Then click "OK".

Page 40: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 39

4. If you place your mouse cursor over the range between Lowest Value and 16, you will notice that a tag of “Less than or equal to 17”. If we wanted to change this to less than 16, click on the small blue arrow next to 17. This will “move the value above the threshold”. For this example, we will keep the value at its default of less than or equal to.

5. Now you have to define what the style will be for a score in this range. Cognos has built-in stylings that correspond with Excellent, Very Good, Average, Below Average, and Poor. You can also create a custom style by selecting "<Custom>" in the drop-down box and then clicking on the "Edit Style" icon. From here, you can change fonts, color, sizing, style, effects, or alignment of the text. In this example, we will set the background color to red.

Page 41: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 40

6. Repeat as needed for additional ranges or selected values.

7. Repeat for any additional columns. Your end result should look something like this:

How to Create a Crosstab

In addition to list reports, Query Studio can also format reports as Crosstabs (or sometimes called Pivot tables). These are particularly helpful when trying to show more summary information, but with less space taken up. It is also good for showing data crossing different dimensions (Average SAT Math Score per state of residence, per academic period).

Page 42: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 41

This report is derived from the Student Detail package and our goal is to display the percentage of credits earned compared with credits attempted per academic department, per academic period.

1. Create a list report with all the necessary columns. In this example, we also created a calculated column for percent of credits earned. Group as needed (in this example, no grouping is necessary).

Page 43: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 42

2. Click on the Pivot button either in the Toolbar or under Change Layout Menu display, for the Academic Period column.

3. At this point you will notice that your report has become a Crosstab and automatically has summarized data in the footer. You can also sort if needed (in this example, we have chosen to sort the departments in ascending order).

Page 44: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 43

Page Breaks

One additional formatting that you may want to do for your report is to set up page breaks. In Query Studio, page breaks can be used only on grouped or sectioned query items.

In this example, we are working with the Operating Ledger package and we want to create page breaks after every change of Organization.

1. First, section or group by Organization (in this example, we chose to group by Organization_Desc).

2. Next, with the Organization_Desc column selected, go to the Change Layout Menu display and select "Set Page Breaks."

Page 45: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 44

3. You will notice now that only the Academic Advising organization and its accounts are listed on the page. You will then need to use the Page Up or Down to cycle through the organizations.

Page 46: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 45

Using Slotted and Addresses by Rule Views

Slotted Views

Slotted tables are used to store certain data values according to display rules in a "flat" representation. For example, a student may take the SAT Math, Verbal, and Writing tests twice. If you were to run a report looking for SAT scores, you would be presented with multiple student records (one row per student per test type, per test date). What the ODS does is, based on a specified rule, takes the highest SAT scores of each type and presents them in one student record.

While this may make reporting seem easier, it comes with one specific trade-off: a record may fall into more than one rule. For example, in Test Slots, if a student takes an SAT Math exam, he/she would actually have 3 separate records (SAT Math scores are in three different rules).

1. Add in all of your additional data columns, sort, and filter as needed. 2. If you have not already done so, switch the report to Preview with No Data. 3. Some Slotted Views such as for Admissions Test Scores are governed by a display rule (others

simply take a certain number of values). If the slotted view has a display rule add that as a data column (for this example, we will add TEST_RULE).

4. Right click on the Test Rule column and select Filter. 5. Cognos will then create a list of all of the possible display rules. If you already know the display

rule, you can Type in the Value. We are going to select ADMSTEST. Then click OK.

Page 47: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 46

6. Run the report. You may notice that fewer records appear than before. Just as a record may reside in more than one display rule, it may also not have your specified display rule (or any at all). To include records that have no display rule, change the missing values properties to include missing values.

7. Add in your Slotted View data items (in this case TEST_DESC1/2 and TEST_SCORE1/2). You may want to remove the rule column but keep the filter. To do this, delete the column and when prompted, elect to not delete the filter.

Address by Rule View

In an effort to keep addresses organized and reports running quickly, the ODS has addresses available by

display rules. Follow the directions for slotted views with one exception:

Make sure your data is turned off when you drag over the ADDRESS_RULE column. Then when

you go to filter on a display rule, instead of waiting for Cognos to generate selections, click on

the Type in Values option.

Creating Charts

In Query Studio, in addition to presenting data in list or crosstab formats, you can also utilize charts to visualize data. Charts require at least one measure to be present (for charting non-measure query items, you have to use Report Studio). In this example, we are looking for the number of students that took courses in Fall 2008 by department.

Page 48: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 47

1. We summarized ID with a count summary for cells and a total for the footer. We then filtered on Academic Period = Fall 2008 and deleted the column (kept the filter).

2. Click on the Chart Icon either in your Toolbar or under the Change Layout Menu display.

Page 49: Essentials of Cognos Connection and Query Studio v8 3

Essentials of Cognos Connection and Query Studio: Cognos v8.3 48

3. Define which chart type and its configuration. You can also select to show values on the chart and/or to show both the chart and table or just the chart.

4. Your final result is a columned chart, with accompanying data. You can export this chart to Excel and make additional edits. If at any point you would like to remove the chart, go back to the Chart edit dialogue box and select Chart Type: None


Recommended