You are on page 1of 102

Cognos Report Studio

Cognos Report Studio


Introduction
This document introduces you to Cognos Report Studio. The Report Studio and Query Studio reporting tools are two parts of the Cognos ReportNet web application that allows you to create ad hoc and managed reports. With Query Studio, you created ad hoc reports. Report Studio lets you create and manage complex reports, define layouts and styles, and much more. t offers more flexibility in calculating and in formatting report data. With Report Studio you can !uthor complex reports using your data. Sa"e and reuse reports. Run reports in a "ariety of formats. #rint reports. Create report templates. $anage reports. Note% &ou can open a Query Studio report in Report Studio and edit it as a Report Studio report. 'owe"er, you cannot open a Report Studio report in Query Studio

Prerequisites
To use this training material effecti"ely, you should be familiar with producing ad hoc reports using Query Studio. Some exercises in this class build on s(ills you ac)uired in the Query Studio class. &ou should also be familiar with your department*s data. This training is designed to familiari+e you with the Cognos Report Studio reporting tool, it is not designed to familiari+e you with the underlying data in -.*s system. The training is based on data in a demonstration database. Important Note This training document was designed originally to be used in a class setting. Therefore, the exercises are meant to be followed in a se)uence. f you ha"e difficulty wor(ing through an exercise, try the first four exercises to familiari+e yourself with the basics.

Training Objectives
This class was designed using a des(top computer running the Windows /# operating system and using the nternet 0xplorer 1"ersion 2.3.45 browser. f you use a different type of computer or operating system, some of the screen graphics may appear slightly different from those printed here. 'owe"er, the function of the screen 1page5 should remain the same. !fter you complete the exercises in this training material, you should be able to do the following% 6pen the C67N6S Connection web page. 6pen Report Studio. Create a report. Choose the pac(age for the report. 8

Copyright 2004-2005 University of Delaware

Cognos Report Studio

Choose a template for the report. !dd )uery items to the report. Sa"e the report. Run the report. Recogni+e the types of reports. Change the appearance of reports. Create crosstab reports. -se charts. 9ilter, sort, and group data. !dd prompts. #erform calculations. Create .rill:Through reports. Create reports from scratch. !dd styling and images. -nderstand how reports are structured. Create a $aster:.etail report. Create a #arent:Child report. Create a report template.

Conventions
The following con"entions are used throughout the exercises in this material%

Item
Text you should type Text you should replace ;eyboard (ey names $enu and Window titles
Copyright 2004-2005 University of Delaware

Convention
Courier, bold, 10 point font Courier, bold, italics, 10 point font

<old, -ppercase text 1e.g., the ENTER (ey5 Bold, mixed-case letters 4

Cognos Report Studio

Table of Contents
The Cognos Conne tion !e" Site
0xercise 8=6pen the Cognos Connection Web Site. Open Report Studio 0xercise 4=6pen Report Studio and <egin a New Report. The Report Studio Window Report Terminology Add Data to a Report 0xercise >=!dd .ata to a Report and Sa"e t. Run the Report 0xercise ?=@alidate and Run the Report. # $ % & '' 13 '( '( '# '% 5

Types of Reports
ist Reports 7rouped Aist Reports 0xercise B=Create a 7rouped Aist Report and Set the Ae"el Span. Create Repeated 9orm 9rames from a Aist 0xercise 2=Create Repeated 9orm 9rames from a Aist Crosstab Reports 0xercise C=Create a New Crosstab Report. 0xercise D=Create a Crosstab Report from an 0xisting Report. Charts 0xercise E=@iew the Types of Report Studio Charts. Create a Chart 0xercise 83=Create a Column Chart. 0xercise 88=Create a Combination Chart.

22 2(

)anipulate Data in Reports


9ilters 0xercise 84=!dd a 9ilter. 9ilter on .etails and Summaries 0xercise 8>=9ilter on .etails. 0xercise 8?=Create a Summary 9ilter. 9ilter 7roups 0xercise 8B=9ilter 7roups.
Copyright 2004-2005 University of Delaware

2$ 2$ 2&

(2

>

Cognos Report Studio

9ilter Crosstabs 0xercise 82=9ilter a Crosstab Report.

((

#rompts 0xercise 8C=!dd a #rompt. 0xercise 8D=-se the F<uild #rompt #ageG Tool. Cascading #rompts 0xercise 8E=<uild a Cascading #rompt. 0xercise 43=Create a Single:@alue Cascading #rompt. 0xercise 48=Create a $ultiple:@alue Cascading #rompt. 6ptional #rompts 0xercise 44=!dd an 6ptional #rompt. .rill Throughs 0xercise 4>=Create a Target Report. 0xercise 4?=Create a #arent Report with a .rill Through.

(#

4'

45 4#

Report *ayouts
0xercise 4B=Create a Report Aayout. 0xercise 42=Create a Crosstab Report from Scratch.

52

+dvan ed Te hni,ues
0xercise 4C=Change the 6rgani+ation of a Aist Report. 0xercise 4D=!dd Styling at a 'igher Ae"el. 0xercise 4E=!dd an mage or !nnotate a Crosstab Report.

5&

Report Studio -ueries


0xercise >3=0xplore the Report Studio Tabular $odel. 0xercise >8=Wor( with the Report Studio Cube .efinition.

#4

)aster-Detail Reports
0xercise >4=Create a $aster:.etail Report. 0xercise >>=!dd a 9ilter to a $aster:.etail Report.

$0

.arent-Child Report
0xercise >?=Create a #arent:Child Report.

$# %'

Create an /nvoi e
0xercise >B=Create a Query for an n"oice. 0xercise >2=<uild the n"oice #age 'eader. 0xercise >C=Create the n"oice #age <ody. 0xercise >D=!dd .ata to the n"oice. 0xercise >E=!dd a Aist 9ooter to the Report.

Create a Te0plate
0xercise ?3=Create a Report Template.
Copyright 2004-2005 University of Delaware

&$

Cognos Report Studio

The Cognos Connection Web site


<efore you can use Report Studio, you must (now how to open the !ognos !onnection "e# site. Exercise 1Open the Cognos Connection Web Site Note% Report Studio wor(s only on the nternet 0xplorer web browser on a computer running the Windows operating system. 8. 6pen the nternet 0xplorer web browser. 4. To access the Cognos Connection web site, type the following -RA in the browser*s Address field and then press ENTER%
https://cognos.udel.edu/crn/

>. Type your $DelNet ID in the appropriate field. ?. Type your pass"ord in the appropriate field. &ou should see a window similar to the following%

The Cognos Connection web site gi"es you access to the ReportNet suite of reporting tools% Query Studio and Report Studio. Query Studio allows you to create ad hoc reports from an existing data source. Report Studio allows you to author complex reports based on your business needs. Reports can contain multiple report obHects% lists, charts, and crosstabs as well as images, logos, and other elements.
End o Exercise

Copyright 2004-2005 University of Delaware

Cognos Report Studio

Open !eport Studio


n the following exercise, you will open Report Studio and begin to create a new report. t is also possible to open an existing report 1this will be discussed later in this class5. Exercise "Open !eport Studio and #egin a $e% !eport 8. !t the top right of the Cognos Connection Web Site window, clic( the Report Studio lin(.

&ou should see the Select a pac%age window, similar to the following, that contains the pac(ages you can use%

4. Clic( &o Sales and Retailers. Note% <efore you can create a report, a -. Cognos administrator must create a pac(age that contains the data you will wor( with. &ou will learn the name of the pac(age that contains -. data from the -. Cognos administrator at a later date. 1!nyone can create a report using the &o Sales and Retailers training pac(age.5 Report Studio will open and you will see a window similar to the following%

Copyright 2004-2005 University of Delaware

Cognos Report Studio

B.

n the 'elcome box, clic(

!reate a ne" report.

This brings up a box with a list of layout obHects you can use to create your report%

2. Clic( ist to select a list report and clic( O(. &ou will see a window li(e the one below%

End o Exercise

The !eport Studio Windo%


The Report Studio window contains an nsertable 6bHects pane, a #roperties #ane, an 0xplorer <ar and a Wor( !rea. ! toolbar abo"e the panes allows you to carry out many functions by clic(ing an icon, there is also a menu bar at the top of the window with a "ariety of Report Studio commands. 9ollowing is a description of the areas of the Report Studio window% Inserta#le O#)ects pane The Inserta#le O#)ects pane at the top left of the Report Studio window contains obHects that you add to your report. There are three tabs in this pane%
Copyright 2004-2005 University of Delaware

Cognos Report Studio

6n the *odel tab are items, such as )uery items, from the pac(age you are using. 6n the +uery Items tab is a description 1tree diagram5 of the )ueries you are creating in your report. 6n the Tool#ox tab are other obHects you can add to your report li(e text, calculations, hyperlin(s, images, and more.

,roperties ,ane The ,roperties pane at the lower left of the Report Studio window lists properties you can apply to a gi"en item in a report. &ou will wor( with the ,roperties pane later in this class. Explorer Bar The Explorer Bar, the "ertical bar at the center of the Report Studio window, contains three buttons%

The ,age Explorer lets you na"igate to a specific report page or prompt page. The +uery Explorer lets you create or change report )ueries. The !ondition Explorer lets you wor( with "ariables.

'or% Area Report Studio*s right pane is the 'or% Area, the space where you create your reports.

!eport Termino&og'
<efore you begin to use Report Studio, you should understand the terminology associated with its reports. 0ach report has two aspects% ! layout Queries

The report layout defines your report*s formatting and appearance. <ased on your needs, your report can contain obHects such as lists, crosstabs, and charts. t can be formatted to include such features as color bac(grounds, images, dates, and more. &ou also ha"e control o"er how the data appears on multiple:page reports.

Copyright 2004-2005 University of Delaware

Cognos Report Studio

The pages in Report Studio contain the obHects you include in your report. 0ach page must ha"e a page body. t can also ha"e a header and a footer. Report -ueries control the data items in your report. The simplest )ueries are created by adding report items from the pac(age you are using. 'owe"er, complex )ueries can contain filters, calculations, grouping and more. &ou can change the )ueries Report Studio creates as well as create custom )ueries.

(dd )ata to a !eport


The )uery items you add to your report appear on the *odel ta# of the Inserta#le O#)ects pane in the Report Studio window. To insert a )uery item, you can either double:clic( the item or clic( the item and drag it into the report. &ou can use CTRA:clic( to insert multiple items, items will appear in the order in which you select them. ! bold blac( bar in the wor( area indicates where you can place )uery items. n the following exercise, you will create a report that shows the )uantity of each product type your retailers sold and the re"enue generated by the sales. To do this, you will first add data to your report and sa"e it. Exercise *(dd )ata to a !eport and Save It 8. 6n the *odel tab of your list report, clic( the plus sign to expand the Orders item. 4. Clic( Retailer name. >. 'old down the !TR (ey, expand the ,roducts item and clic( ,roduct type. ?. Continue to hold down the !TR (ey and in the Orders item, clic( +uantity and Re.enue. B. .rag the selected items to the wor( area and release the mouse button when you see the bold blac( bar. &ou will see a window li(e the one below%

Copyright 2004-2005 University of Delaware

Cognos Report Studio

Notice that no data appears in the report yet. &ou must sa"e and run the report to see the data.

&ou can obtain information about your report*s structure and the items it contains by selecting some of the other tabs and features in the window% 2. Clic( the title of the Retailer name column. This produces a list of properties li(e the one below in the ,roperties pane at the lower:left of the Report Studio window%

Note that this is a partial list, scroll down to see the remaining properties a"ailable to apply to the Retailer name column. Note% When you select a property, you will see a description of what it does at the "ery bottom of the pane. f the description is not "isible, select ,roperty Descriptions from the /ie" menu to see it.
Copyright 2004-2005 University of Delaware

83

Cognos Report Studio

C.

n the Inserta#le O#)ects pane, clic( the +uery Items tab to see the structure of the )uery Report Studio has created from your items%

D. $o"e the mouse pointer o"er each of the components of the Explorer Bar in the center of the window to see the type of information each pro"ides. Next, you will sa"e your report. E. 6n the 0ile menu, clic( Sa.e As. &ou will see a box li(e the one below%

83. n the Name box, type your initials Retailer Revenue. Clic( Sa.e.
End o Exercise

!un the !eport


!fter you create a report in Report Studio, you must run it to see the actual data. Report Studio offers a tool to "alidate the report before you run it to ma(e sure it contains no errors. This will be important when you de"elop complex reports with features such as calculations.

Copyright 2004-2005 University of Delaware

88

Cognos Report Studio

n the next exercise, you will "alidate the Retailer Re.enue report and then run it to see the data it contains. Exercise +,a&idate and !un the !eport 8. n the Retailer Re.enue report, clic( the /alidate toolbar button.

&ou will recei"e a message that the report is being "alidated, followed by a box indicating whether the report specification is "alid. Clic( O( to close the box. 4. 6n the toolbar, clic( the Run button*s down:arrow and select Run Report 12T* 3.

&our results will appear in a separate Report @iewer window li(e the one below. Note that the window below shows a partial list, scroll down to see the remaining data.

End o Exercise

Options 4or Running Reports n the pre"ious exercise, you will ha"e noticed fi"e options for running your report%

Run Report 12T* 3

#roduces a report in 'T$A format. f you run your report in 'T$A, you can clic( the Run Options command and type in the *aximum Ro"s box a number for the maximum number of rows you want to see on each report page. -se this option when you want to print your report or sa"e a permanent copy. Note% !dobe !crobat Reader 84

Run Report 1,D03


Copyright 2004-2005 University of Delaware

Cognos Report Studio

must be installed on your system for you to run your report in #.9 format. f you run your report in #.9, you can clic( the Run Options command to select the output format 1#.95, the paper si+e, paper orientation, and language for the report. Run Report 15 S3 -se this option to produce a report in $icrosoft 0xcel. 9or limitations associated with this option, see F#roducing Reports in $icrosoft 0xcel 9ormatG in the Report Studio 'elp. -se the CS@ 1comma separated "alues5 option if you want to sa"e your results to be opened in an application li(e $icrosoft 0xcel. -se the /$A 10xtensible $ar(up Aanguage5 option to see an /$A representation of the )ueries, prompts, layouts, and styles in your report.

Run Report 1!S/3

Run Report 15* 3

Note% &ou cannot run a report in /$A or CS@ format if it contains more than one )uery unless the other )ueries are used as prompts 1prompts will be discussed later in this class5. /ie" Ta#ular Data on the Run menu allows you to see only the tabular data 1for example, to chec( that your calculations are correct5 before you select one of the Run options.

T'pes o !eports
&ou can create three types of reports in Report Studio% ist Report ! list report is a representation of your data in rows and columns and is useful for showing detailed database information. The report you created for Retailer Re.enue beginning in 0xercise 4 is a list report. &ou can manipulate list report data in "arious ways to obtain the information you need. !rossta# Report &ou can create a crosstab report to show information in summary form. The report still has rows and columns, but the intersection of the rows and columns shows a summary of information. !harts &ou can create a chart to show your information in graphical form. There are se"eral types of graphs you can use in Report Studio. These will be explained later in this class. Report Studio allows you to combine multiple types of reports in one report.

-ist !eports
&rouped ist Reports
Copyright 2004-2005 University of Delaware

8>

Cognos Report Studio

n the pre"ious exercises, you created a list report. &ou may ha"e noticed duplicate "alues in the Retailer Re.enue report you Hust created. 9or example, each retailer*s name appears multiple times, once for each product type the retailer sold. &ou can manipulate the report to sort the data and to hide duplicate "alues through a process called grouping. Report Studio also allows you to control when "alues are displayed through a process called setting the le.el span. n the following exercise, you will create a new list report. &ou will then group two of the report items and set the le"el span so that you see certain data when the data changes in a related column. Exercise .Create a /rouped -ist !eport and Set the -eve& Span 8. 6n the Report Studio toolbar, clic( the Ne" button to create a new report. f you are as(ed if you want to sa"e the pre"ious report, clic( 6es. 4. n the Ne" box, select ist and clic( O(.

>. 6n the *odel tab, expand the !ountries item by clic(ing the plus sign. ?. Clic( !ountry. B. 'old down the !TR (ey, expand the ,roducts item, clic( ,roduct type and ,roduct name. 2. .rag the selected items to the wor( area and release the mouse button when you see the bold blac( bar. &ou will see a window li(e the one below%

C. 6n the toolbar, clic( the Run

button*s down:arrow and select Run Report 12T* 3.

Notice that there are many duplicate "alues in the report. &ou can eliminate duplicates by grouping "alues.

Copyright 2004-2005 University of Delaware

8?

Cognos Report Studio

D.

n the Report Studio window, clic( the title of the !ountry column, hold down the S2I0T (ey and clic( the title of the ,roduct type column to select both columns. button.

E. 6n the Report Studio toolbar, clic( the &roup7$ngroup

7rouping adds a symbol to the selected columns to indicate that each column is grouped. &our report columns now loo( li(e the ones below%

83. Run the report again to see the effect of grouping the columns. &our results will appear in a separate Report /ie"er window li(e the one below. Note that the window below shows a partial list, scroll down to see the remaining data.

Now each product type appears only once for each country. Suppose you decide that, since each country sells many product types, you would li(e to ha"e the country name appear each time the product type changes. Report Studio lets you set the le.el span to do this. 88. n the Report Studio window, clic( the title of the !ountry column. Now the properties you can apply to the column appear in the ,roperties pane%

Copyright 2004-2005 University of Delaware

8B

Cognos Report Studio

84. n the ,roperties pane, under the Data heading, double:clic( e.el Span. &ou will see a box li(e the one below%

8>. n the !hoose e.el box, clic( ,roduct type and then clic( O(. Compare your report columns now with the grouped columns in step D abo"e. 8?. Run the report. &our results should loo( li(e those below. Notice that now, each time the product type changes, the country name appears beside it.

8B. Close the Report /ie"er window. 82. 6n the Report Studio window 0ile menu, clic( Sa.e As.
Copyright 2004-2005 University of Delaware

82

Cognos Report Studio

8C. n the Sa"e !s Name box, type your initials Grouped Country. Clic( Sa.e.
End o Exercise

!reate Repeated 0orm 0rames 4rom a ist &ou can use a list report to create repeated form frames for data. 9or example, you might want to create labels listing each of your retailers with a contact name and city. To do this, you first create a list report. n the following exercise, you will create a list report and con"ert it to a repeater 1creates a single form frame5. &ou will then set properties for the frame to create multiple frames on each page. Exercise 0Create !epeated 1orm 1rames rom a -ist 8. 6n the Report Studio toolbar, clic( the Ne" button to create a new report. f you are as(ed if you want to sa"e the pre"ious report, clic( 6es. 4. n the Ne" box, select ist and clic( O(.

>. 6n the *odel tab, expand the Retailers item by clic(ing the plus sign. ?. Clic( Retailer name. 'old down the CTRA (ey and clic( !ontact last name, !ontact 4irst name, and !ity. B. .rag the selected items to the wor( area and release the mouse button when you see the bold blac( bar. 2. 6n the Structure menu, clic( !on.ert ist to Repeater. &our report will now contain one form frame and loo( li(e the one below%

C. To set the number of form frames to appear on each report page, clic( anywhere in the bac(ground of the frame you ha"e created to bring up its ,roperties pane%

Copyright 2004-2005 University of Delaware

8C

Cognos Report Studio

D. !t the top center of the ,roperties pane, clic( the Ancestor box, select Repeater.

button and, from the pop:up

E. -nder &eneral in the ,roperties pane, highlight the number beside Across and type 3. Then highlight the number beside Do"n and type 3. 83. Run the report. &ou should see a Report /ie"er window li(e the one below with E frames per page. Scroll down to see the remaining pages.

88. Close the Report /ie"er window. 84. 6n the Report Studio 0ile menu, clic( Sa.e As. 8>. n the Sa"e !s Name box, type your initials Level Span List. Clic( Sa.e.
End o Exercise

Copyright 2004-2005 University of Delaware

8D

Cognos Report Studio

Crosstab !eports
! crosstab report shows information in summary form. The report still has rows and columns, but the intersection of the rows and columns shows a summary of )uantitati"e information. &ou can create crosstab reports in two ways% Create a new Report Studio report, selecting Crosstab from the Ne" box. 6pen an existing Aist report and use the ,i.ot button to change it into a crosstab.

Crosstab reports can contain nested data to ma(e it easy to compare or increase the information you see. n the following exercise, you will create a new crosstab report. Exercise 2Create a $e% Crosstab !eport 8. 6n the Report Studio toolbar, clic( the Ne" button to create a new report. f you are as(ed if you want to sa"e the pre"ious report, clic( 6es.

4.

n the Ne" box, select !rossta# the one below%

and clic( O(. &ou will see a window wor( area li(e

>. 6n the *odel tab, expand the !ountries item by clic(ing on the plus sign. ?. Clic( Sales territory to select it and drag the selection to the !olumns section of the wor( area. When you see the bold blac( bar abo"e !olumns, release the mouse button. B. 0xpand the ,roduct item by clic(ing on the plus sign. Clic( ,roduct type to select it and drag the selection to the Ro"s section of the wor( area. When you see the bold blac( bar to the left of Ro"s, release the mouse button. 2. 0xpand the Orders item by clic(ing on the plus sign. Clic( +uantity to select it and drag the selection to the *easures section of the wor( area. When you see the *easures area flash blac(, release the mouse button.

Copyright 2004-2005 University of Delaware

8E

Cognos Report Studio

C. Run the report. &ou will see a window li(e the one below. The intersection of the rows and columns shows the number of product types sold in each sales territory.

Suppose you want your crosstab report to show how many of each indi"idual product were sold in each sales territory. &ou can nest information by dragging additional items into the report rows or columns. D. n the Orders item, clic( ,roduct name to select it and drag the selection to the right of ,roduct type in the Ro"s section of the wor( area. When you see the bold blac( bar, release the mouse button.

E. Run the report and compare the results with those in step C abo"e. Next you will add an additional measure 1)uantitati"e data5 to the crosstab. When you do this, each measure is shown as a column. 83. n the Orders item, clic( Re.enue to select it and drag the selection to the right of one of the +uantity items in the *easures section of the wor( area. When you see the bold blac( bar, release the mouse button. 88. Run the report. &our Report /ie"er window should now loo( li(e the one below. Scroll down to see the rest of the information.

Copyright 2004-2005 University of Delaware

43

Cognos Report Studio

!t times, a crosstab report may be easier to read if you swap the rows and columns. To do this% 84. n the Report Studio window, clic( the Sales territory column title. 6n the toolbar, clic( the S"ap Ro"s and !olumns button.

8>. Run the report and compare the loo( of the report with that in step 84 abo"e. Close the Report /ie"er window 8?. 6n the Report Studio window 0ile menu, clic( Sa.e As. 8B. n the Sa"e !s Name box, type your initials Nested !rossta#. Clic( Sa.e. Note% &ou will not perform all these steps for e"ery crosstab report. The steps you select depend upon your indi"idual needs.
End o Exercise

Note% f you want to create an 0xcel:li(e crosstab, you must be sure that the data item you want Report Studio to recogni+e as a fact 1)uantitati"e data5 is dropped into the report as a measure. 6therwise, it will not be treated correctly. n the pre"ious exercise, you created a new crosstab report using a Report Studio template. &ou can also create a crosstab report using an existing list report. &ou can open an existing report from within Report Studio or by clic(ing the #ublic 9olders tab in the Cognos Connection Welcome window, selecting &o Sales and Retailers, and searching for your report. 6nce you ha"e located the report you want to edit, clic( the *ore lin( at the far right of the line it is on and select Edit "ith Report Studio. Note% &ou can open a Query Studio report in Report Studio and edit it as a Report Studio report. 'owe"er, you cannot open a Report Studio report in Query Studio n the following exercise, you will create a crosstab report based on the &rouped !ountry report you created earlier. &ou will open the report in Report Studio and ma(e a few changes before you create the crosstab. Exercise 3Create a Crosstab !eport rom an Existing !eport 8. 6n the Report Studio menu, clic( Open to open an existing report. f you are as(ed if you want to sa"e the pre"ious report, clic( 6es. 4. n the Open box, scroll down to the report your initials &rouped !ountry. Clic( the report to select it and clic( Open.

>. To add a measure to the report 1e"ery crosstab must ha"e at least one measure5, expand the Orders item and double:clic( Re.enue. ! Re.enue column appears after the last report column. Note that double:clic(ing is an alternate way to add items to a report. Suppose that to ma(e the report more succinct, you decide to remo"e the ,roduct name
Copyright 2004-2005 University of Delaware

48

Cognos Report Studio

column before you create the crosstab. &ou can remo"e Report Studio information either permanently by clic(ing the Delete button. button or temporarily by clic(ing the !ut button.

?. Clic( the title of the ,roduct name column to select it, then clic( the Cut

The ,roduct Name column is remo"ed. 'owe"er, it still remains a"ailable on the +uery Items tab of the Inserta#le O#)ects pane. B. Clic( the +uery Items tab on the Inserta#le O#)ects pane to see the structure of the )uery Report Studio is building. Note that the ,roduct name item is still in the )uery. f you wanted to add it bac( into your report, you would drag it to the position you wanted it to occupy. 2. Clic( the title of the !ountry column 1the item you want to appear in the columns section of your crosstab5. C. 6n the toolbar, clic( the ,i.ot ist to !rossta# button then run the report. &our Report /ie"er window will loo( li(e the one below. Scroll across and down to see the rest of the page.

Charts
Charts allow you to present your information graphically. Report Studio offers E types of charts with multiple configurations for each type. To see the chart types, you can open the Ne" report box in Report Studio and select !hart. <esides being able to create many different types of charts based on Report Studio templates, you can create custom charts that combine chart types. &ou can also alter the appearance of a chart by changing chart properties to include bac(ground images and foreground and bac(ground colors. &ou can also change chart labels and titles. 9or combination charts, you can control how the data items will appear. n the following exercise, you will "iew the types of charts a"ailable in Report Studio and learn how to choose the one most suited to your purposes. Exercise 4,ie% the T'pes o !eport Studio Charts
Copyright 2004-2005 University of Delaware

44

Cognos Report Studio

8. 6n the Report Studio toolbar, clic( the Ne" button to create a new report. f you are as(ed if you want to sa"e the pre"ious report, clic( No. 4. n the Ne" box, select !hart and clic( O(. &ou will see a window li(e the one below%

>. Clic( some of the chart types in the !hart grouping pane. 9or each item you select, you will see all the configurations a"ailable for that particular chart type in the !hart type pane. ?. Clic( some of the chart configurations in the !hart type pane. When you select a configuration, you will see the type of chart configuration immediately under !hart type. !t the same time, you will see an explanation of how the chart will appear and what it is used for.
End o Exercise

Create a Chart
When you create a chart in Report Studio, you add data to three drop +ones. The numbers in the +one boxes show the order in which the items will be added if you double:clic( them. !lternati"ely, you can drag items into the +ones where you want them to appear. The +ones are% $easures% The numbers 1)uantitati"e data5 that will be plotted on the & axis. Categories% The "alues that appear on the / axis against which each data series is plotted. Series% ! group of related data points. The data series appear in the chart*s legend, with each series ha"ing a different color or pattern. FSeriesG is an optional drop +one when you create a chart.

n the following exercise, you will create a column chart and change some of its properties. The chart will show the )uantity of products sold by each order method in 4333, 4338 and 4334.

Copyright 2004-2005 University of Delaware

4>

Cognos Report Studio

Exercise 15Create a Co&umn Chart 8. n the Insert !hart box that you opened in the pre"ious exercise, clic( the icon for the !olumn chart and clic( O(. &ou will see a wor( area pane li(e the one below%

Note the three drop +ones and the numbers indicating the order in which data will be placed if you double:clic( the items. !lso note the corresponding numbers on the chart itself that indicate where the data will appear. 4. 6n the *odel tab, expand the Orders item. Clic( +uantity to select it and drag the selection to the *easures drop +one of the chart. >. Clic( Order year to select it and drag the selection to the !ategories drop +one of the chart. ?. Clic( Order method to select it and drag the selection to the Series drop +one of the chart. B. Run the report to see the chart you ha"e created. Note that Report Studio has added labels for the axes and legend as well as the date, page number, and time at the bottom of the page. The chart itself will loo( li(e the one below%

Copyright 2004-2005 University of Delaware

4?

Cognos Report Studio

2. C. D.

n the Report Studio window, clic( the *easures drop +one 1it now reads +uantity5. Note the properties you can apply to the +uantity item. n the ,roperties pane, clic( the Text property then clic( the box with the ellipses at the end of the Text row. 10llipses indicate that there are additional options for the property5. n the Text box, type Number of products sold and clic( O(. Run the report again to see the title change on the & axis.

E. 6n the 0ile menu, clic( Sa.e As. 83. n the Sa"e !s Name box, type your initials Sales Chart. Clic( Sa.e. f you decide another chart type would better represent your data, you can change types from within the chart window. 88. Clic( anywhere in the bac(ground 1white5 area of the chart to highlight it. 84. n the ,roperties pane, under &eneral, clic( !hart Type. 8>. Clic( the ellipsis box and, from the Column Chart 7rouping, select 899 ,ercent Stac%ed !olumn 1last icon on the top row5. Clic( O(. 8?. Run the report to see how the chart loo(s now.
End o Exercise

$any charts will re)uire that you manipulate data or the chart properties to produce meaningful information, particularly when you are wor(ing with multiple measures. Suppose you want to create a chart that shows Re"enue generated for the Quantity of products sold in 4333, 4338, and 4334. To do this, in the next exercise, you will create a combination chart and change its properties. Exercise 11Create a Combination Chart 8. 6n the Report Studio toolbar, clic( the Ne" button to create a new report. f you are as(ed if you want to sa"e the pre"ious report, clic( No. 4. >. ?. n the Ne" box, select !hart and clic( O(. n the !hart grouping pane, clic( !om#ination. n the !hart type pane, clic( the !om#ination icon and clic( O(.

B. 6n the *odel tab, expand the Orders item, clic( +uantity and drag it to the *easures drop +one. &ou will see a !hart Type 4or *easure box. 2. n the !hart Type 4or *easure box, clic( the !olumn icon and clic( O(.

Copyright 2004-2005 University of Delaware

4B

Cognos Report Studio

C. 6n the *odel tab, under the Orders item, clic( Re.enue and drag it to the *easures drop +one, Hust under +uantity. When you see a bold, blac( bar, release the mouse button. &ou will see a !hart Type 4or *easure box. D. n the !hart Type 4or *easure box, clic( the ine icon and clic( O(: The *easures drop +one should now loo( li(e the following%

The corresponding numbers 18.8, 8.45 appear on the chart model to show where the data will appear when you run the report. E. -nder the Orders item, clic( Order year and drag it to the !ategories drop +one. 83. Run the report. &our chart will loo( li(e the one below. Note that since +uantity and Re.enue share the same axis, the chart is not meaningful.

&ou can remedy this problem by changing the chart properties to add another axis and then mapping the Re.enue item to that axis. 88. n the Report Studio window, clic( anywhere in the bac(ground 1white5 area of the chart to highlight it. 84. n the ,roperties pane, clic( the Axis Type property 1under &eneral5 then, from the drop: down box at the end of the Axis Type row, select Dual. 8>. n the *easures box, clic( Re.enue. 8?. n the ,roperties pane, clic( the *easure Axis property 1under &eneral5 then, from the drop:down box at the end of the Axis Type row, select 6;. 8B. Run the report to produce a more meaningful chart li(e the one below. Note the dual axes and their labels.
Copyright 2004-2005 University of Delaware

42

Cognos Report Studio

Now the chart shows clearly the information you wanted to extract from the data. 82. Close the Report /ie"er window. 8C. 6n the Report Studio 0ile menu, clic( Sa.e As. 8D. n the Sa"e !s Name box, type your initials Combination Chart. Clic( Sa.e.
End o Exercise

6anipu&ate )ata in a !eport


&ou can manipulate Report Studio data in many ways to produce a report that shows only the information rele"ant to your audience*s needs. Some of the changes you can ma(e are% !dd a filter to produce a subset of results. Sort and group data to produce custom reports. 9ormat data to change the appearance of numbers, currency, dates, and times. #erform calculations using your data.

1i&ters
To produce a report that shows a subset of your data, you can add a filter to a report item. Suppose you produce a report that shows the product types your company sells along with order dates and the )uantity sold. &ou might want your results to show only )uantities o"er >33, excluding all data with numbers less than that. The following exercise will show you how to create this report. Exercise 1"(dd a 1i&ter 8. 6n the Report Studio toolbar, clic( the Ne" 4. n the Ne" box, select ist and clic( O(. 4C button to create a new report.

Copyright 2004-2005 University of Delaware

Cognos Report Studio

>. 6n the *odel tab, expand the ,roducts item and clic( ,roduct type. ?. 'old down the !TR (ey, expand the Orders item, clic( Order date and then +uantity. B. .rag your selections to the wor( area. 2. Clic( the title of the ,roduct type item then clic( the &roup7$ngroup toolbar. C. Run the report to "iew the data then close the Report /ie"er window. D. Clic( the title of the +uantity item then clic( the 0ilters see a 0ilters window li(e the one below. button on the toolbar. &ou will button on the

E. To create a filter, clic( the Add li(e the one below%

button. &ou will see a Ta#ular *odel 0ilter window

83. n the A.aila#le !omponents pane, clic( the +uery Items tab and double:clic( +uantity.
Copyright 2004-2005 University of Delaware

4D

Cognos Report Studio

+uantity will now appear in the Expression De4inition pane. Note% &ou can also type the entire filter directly into the Expression De4inition pane. f you are typing a year, it must be in the format &&&&:$$:... 88. Clic( in the Expression De4inition pane Hust after +uantity and type >=300. Note% !lternati"ely, you can clic( the 0unctions tab and select the IJ function from the list. 84. Clic( the /alidate button to ensure that there are no mista(es in the expression. &ou will see the "alidation results in the In4ormation pane of the Ta#ular *odel 0ilter window. Then clic( O(. This returns you to the 0ilters window. 8>. Clic( O(. 8?. Run the report. &ou will see a Report /ie"er window li(e the one below that now shows only )uantities greater than or e)ual to >33. #age down in the window to see all of the data.

8B. 6n the Report Studio 0ile menu, clic( Sa"e As. 82. n the Sa"e !s Name box, type your initials Quantity Filtered. Clic( Sa.e.
End o Exercise

Note% To edit a filter, clic( the Report Studio column that has been filtered, then clic( the 9ilter icon. n the 9ilters box, clic( the filter and then clic( the 0dit icon.

1i&ter on )etai&s and Summaries


&ou can filter reports in se"eral ways. n the following exercise, you will create a report, 1in this case, total5 the data, and filter first on detail data and then on the summary data. Exercise 1*1i&ter on )etai&s

Copyright 2004-2005 University of Delaware

4E

Cognos Report Studio

8. 6n the Report Studio toolbar, clic( the Ne" 4. n the Ne" box, select ist and clic( O(.

button to create a new report.

>. 6n the *odel tab, expand the ,roducts item and clic( ,roduct type. ?. 'old down the !TR (ey, expand the Orders item, clic( Order *ethod and then +uantity. .rag the selections to the wor( area. B. Clic( the title of the ,roduct type item then clic( the &roup7$ngroup toolbar to group ,roduct type. button on the

2. Clic( the title of the +uantity item and, on the toolbar, clic( the Aggregate down:arrow. Clic( Total.

button*s

C. Run the report and notice the data in the aggregate report. ! summary has been added for each ,roduct type group. #age down to see all of the data%

D. Clic( the title of the +uantity column and, on the toolbar, clic( the 0ilters E. n the 0ilters window, clic( the Add button.

button.

83. Clic( in the Expression De4inition pane and type [Quantity]>100. 88. Clic( the /alidate button to ensure that there are no mista(es in the expression. &ou will see the "alidation results in the In4ormation pane of the Ta#ular *odel 0ilter window. Then clic( O(. This returns you to the 0ilters window. Clic( O(. 84. Run the report. &ou will see a Report /ie"er window li(e the one below that now shows only )uantities greater than 833. #age down in the window to see all of the data.

Copyright 2004-2005 University of Delaware

>3

Cognos Report Studio

8>. n the Report Studio window, clic( the 0ilters button then clic( the filter you created. Note that in the Application box, Be4ore Aggregation is selected%

This means that you filtered on the details in the report=the data in the rows before the aggregation was applied. !ancel the 0ilters window. 8?. 6n the Report Studio 0ile menu, clic( Sa.e As: 8B. n the Sa"e !s Name box, type your initials Filtered Details. Clic( Sa.e. n the following exercise, you will add a filter to the report you Hust created to produce a summary filter Exercise 1+Create a Summar' 1i&ter 8. n the 0iltered Details report, clic( the 0ilters button on the toolbar.

4. Clic( the filter you created earlier and then, in the $sage box, clic( Disa#led.
Copyright 2004-2005 University of Delaware

>8

Cognos Report Studio

>. Clic( the Add

button.

?. Clic( in the Expression De4inition pane and type [Quantity]>5000. B. Clic( the /alidate button to ensure that there are no mista(es in the expression. &ou will see the "alidation results in the In4ormation pane of the Tabular $odel 9ilter window. Clic( O(. This returns you to the 0ilters window. 2. n the 0ilters window Application box, clic( A4ter aggregation and clic( O(. C. Run the report. The summary filter is being applied to the data after the aggregation%

End o Exercise

1i&ter /roups
&ou can filter information at a higher le"el by using the &roup 0ilters tab in the 0ilters window. 7roup filters are applied at the cube le"el 1this will be discussed later in this class5. When you apply a group filter to a report item li(e ,roduct type, product types that do not fit your specification are filtered out when you run the report. n the following exercise, you will apply a group filter to the ,roduct type report item to eliminate from your report product types where the )uantity sold was less than 833,333. Exercise 1.1i&ter /roups 8. 4. >. n the 0iltered Details report, clic( the 0ilters button on the toolbar. n the 0ilters window, clic( the &roup 0ilters tab and then clic( the Add n the Expression De4inition pane, type [Quantity]>100000. button then clic( O(. This returns you to &roup 0ilters tab in the button.

?. Clic( the /alidate 0ilters window.

B. Clic( the ellipsis box under e.el and, in the !hoose le.el box, clic( ,roduct type%
Copyright 2004-2005 University of Delaware

>4

Cognos Report Studio

2. Clic( O(. &ou will see ,roduct type in the e.el box in the 0ilters window. Clic( O(. C. Run the report. Notice that all product types with )uantities less than 833,333, for example, F9irst !idG and FTools,G do not appear in the report. D. 6n the Report Studio 0ile menu, clic( Sa.e As: E. n the Sa"e !s Name box, type your initials Filtered Groups. Clic( Sa.e.
End o Exercise

1i&ter Crosstabs
&ou can filter crosstab reports using all the methods we ha"e discussed for filtering list reports. n the following exercise, you will create a crosstab report and filter it in se"eral ways to see subsets of the data you are using. Exercise 101i&ter a Crosstab !eport 8. 6n the Report Studio window toolbar, clic( the Ne" 4. n the Ne" box, select !rossta# and clic( O(. button to create a new report.

>. 6n the *odel tab, expand the !ountries item and drag Sales territory into the !olumns section of the wor( area. ?. 0xpand the ,roducts item and drag ,roduct type to the Ro"s section of the wor( area then drag ,roduct name to the Ro"s section of the wor( area. Note% &ou must drag each item separately. B. 0xpand the Orders item and drag Re.enue to the *easures section of the wor( area. 2. Run the report to see the data a"ailable to you. Suppose you want to filter your report to see only data for !lim#ing Accessories and !oo%ing &ear sold in !entral Europe, Northern Europe, and Southern Europe. To do this% C. Clic( the 0ilters button on the Report Studio window toolbar. n the 0ilters window, clic( the Add button and create the following filter%
Copyright 2004-2005 University of Delaware

>>

Cognos Report Studio

[Product type] in (Climbing Accessories,Cooking Gear) and [Sales territory] in (Central Europe,Northern Europe,Southern Europe)

Note% 0ach item within the parentheses must be enclosed in single )uotes, and items are separated by commas. !lso, there can be no spaces between items in parentheses. D. Clic( the /alidate button then clic( O(. This returns you to the 0ilters window. Clic( O(. Run the report. &ou should see a report li(e the one below, showing only the items defined in your filter%

Next you will add a second filter to further refine your data. This time, you will filter out any product whose Re.enue is less than KC33. E. Clic( the 0ilters button on the Report Studio window toolbar. n the 0ilters window, clic( the Add button and create the following filter%
[Revenue]>700

83. Clic( the /alidate button then clic( O(. This returns you to the 0ilters window. Clic( O(, and then run the report. &ou should see a report li(e the one below%

Copyright 2004-2005 University of Delaware

>?

Cognos Report Studio

Notice the difference in the re"enue, where products with sales of less than KC33 ha"e been remo"ed from the report. <oth of the crosstab filters you*"e created ha"e filtered on report details before aggregation. !lso, you may ha"e noticed that your report contains two filters. Report Studio has used an F!N.G operator to F!N.G the filters together to create one filter. &ou can include multiple filters 1both before and after aggregation5 in any report. &ou will now add a third filter to your crosstab report, this time after aggregation. 88. Clic( the 0ilters button on the Report Studio window toolbar. n the 0ilters window, clic( the Add button and create the following filter%
[Revenue]>50000

84. Clic( the /alidate

button then clic( O(. This returns you to the 0ilters window.

8>. n the 0ilters window Application box, clic( A4ter aggregation and clic( O(. 8?. Run the report. &ou should see a report li(e the one below%

Now products with re"enue of less than KB3,333 ha"e been eliminated from the report. &ou can also add totals to crosstab reports. 8B. n the Report Studio window, clic( the title of the Sales territory item and, on the toolbar, clic( the Aggregate button*s down:arrow. Clic( Total.

82. Repeat the Total operation for ,roduct type and ,roduct name. 8C. Run the report to see the new summary information that has been added%

Copyright 2004-2005 University of Delaware

>B

Cognos Report Studio

9inally, you can add a group filter to your crosstab report. 8D. Clic( the 0ilters button on the Report Studio window toolbar. n the 0ilters window, clic( the &roup 0ilters tab. 8E. Clic( the Add button and create the following filter%
[Revenue]>500000

43. Clic( the /alidate 0ilters window.

button then clic( O(. This returns you to the &roup 0ilters tab in the

48. Clic( the ellipsis box under e.el and, in the !hoose le.el box, clic( ,roduct name and clic( O(. Clic( O( again to close the 0ilters window. 44. Run the report. The Report /ie"er window will loo( li(e the one below%

4>. 6n the Report Studio window 0ile menu, clic( Sa.e As. 4?. n the Sa"e !s Name box, type your initials Filtered Crosstab. Clic( Sa.e. Note% &ou will apply only the filters you need in your reports. The "arying types of filters used in this exercise illustrate the possibilities for applying filters and demonstrate that multiple filters can be used in a single report.
End o Exercise

Prompts
&ou can gi"e people the ability to customi+e your report information by adding prompts. #rompts ha"e > elements%
Copyright 2004-2005 University of Delaware

>2

Cognos Report Studio

,arameters=the choices you gi"e people ,rompt controls=the interface where people ma(e their choices. n Report Studio, people choose the information they want in the Report /ie"er window. ,arameter .alues=the results of the choices people ma(e.

n Report Studio, you can build prompts in a number of ways. The simplest way is to ha"e Report Studio build the prompt for you. !nytime you add a parameter to a Report Studio filter, Report Studio will prompt the user for information. <eyond that, Report Studio offers a Build ,rompt ,age tool that creates a default prompt page based on the report items you select. &ou can customi+e this report or create your own custom prompt pages. n the following exercise, you will create a report that shows return dates and return )uantities for product types. &ou will then add a prompt that allows a user to select specific product types and date ranges to see only the information that interests them. Exercise 12(dd a Prompt 8. 6n the Report Studio window toolbar, clic( the Ne" 4. n the Ne" box, select ist and clic( O(. button to create a new report.

>. 6n the *odel tab, expand the ,roducts item and drag ,roduct type and ,roduct name into the wor( area. ?. 0xpand the Orders item and then expand the Returned items folder within the Orders item. .rag Return date and Return -uantity to the right of the two items in the wor( area 1release the mouse button when you see the bold blac( bar5. B. Clic( the title of the ,roduct type column then, on the toolbar, clic( the &roup7$ngroup button to remo"e duplicate "alues. 2. Clic( the title of the Return date column then, on the toolbar, clic( the Sort button*s down: arrow and select Sort Ascending. Note% Steps B and 2 simply pro"ide some order 1remo"ing duplicate "alues and sorting5 to your report before you wor( with it further. C. Run the report to see the a"ailable data%

Copyright 2004-2005 University of Delaware

>C

Cognos Report Studio

#age down to see the rest of the data. Note that the return dates are in ascending order. D. Clic( the 0ilters button on the Report Studio window toolbar. n the 0ilters window, clic( the Add button and create the following filter 1this filter contains a parameter named #.ate5%
[Return date]>?PDate?

E. Clic( the /alidate Studio window.

button then clic( O(. Clic( O( a second time to return to the Report

83. Run the report. &ou will notice that the Report /ie"er window re)uires you to choose a date and a time to see the data in your report%

88. Clic( the left arrow beside the year 1433?5 bar until the year reads 4334. Change the calendar to Lune 4> by clic(ing the month and day. Aea"e the time as is and clic( O( 1you may ha"e to scroll down to see the 6; button5. Now your report loo(s li(e the one below with only information for returns after Lune 4>, 4334 included. #age down to see the rest of the data.

Copyright 2004-2005 University of Delaware

>D

Cognos Report Studio

84. Remo"e the filter you*"e created in this report 1clic( the 0ilters button on the Report Studio window toolbar, highlight the filter then clic( the
End o Exercise

to remo"e it. Clic( O(5.

The pre"ious exercise demonstrated the simplest form of a Report Studio prompt=adding a filter with a parameter. This will automatically generate a prompt page in the Report /ie"er. n the next exercise, you will use the F<uild #rompt #ageG tool to create a more complex prompt. 6nce again, Report Studio will build the prompt for you.

Exercise 137se the 8#ui&d Prompt Page9 too& 8. n the Report Studio window, clic( the title of the ,roduct type column, hold down the !TR (ey and clic( the title of the Return date column to select both columns.

4. 6n the toolbar, clic( the Build ,rompt ,age button. <ased on the report items you selected, Report Studio builds a prompt page that loo(s li(e the one below%

Copyright 2004-2005 University of Delaware

>E

Cognos Report Studio

. The prompt page includes buttons at the bottom 1!ancel, Bac%, Next, 0inish5 that your users will clic( after they select "alues for their reports. >. Run the report. The Report /ie"er window will loo( li(e the one below 1the bottom buttons are not shown here5%

?. 9rom the ,roduct type box, select !lim#ing Accessories, hold down the S2I0T (ey and select !oo%ing &ear. B. 2. n the Return date area, under 0rom, type 1or select from the calendar5 Jun 23 2001. n the Return date area, under To, type 1or select from the calendar5 Jun 23 2002.

C. Clic( 0inish. The report will run and will show only products you selected that were returned between Lune 4>, 4338 and Lune 4>, 4334. D. 6n the Report Studio window 0ile menu, clic( Sa.e As.

Copyright 2004-2005 University of Delaware

?3

Cognos Report Studio

E.

n the Sa"e !s Name box, type your initials Simple Prompt. Clic( Sa.e.

83. Close the Report /ie"er window. 88. n the Report Studio window, the ,rompt ,age should still be showing. Clic( inside the ,roduct type prompt box. The ,roperties pane at the lower left of the window shows the properties a"ailable for customi+ing the ,roduct type prompt. Clic( inside the Return date box to see its properties as well. &ou can also see the filters that Report Studio has generated for your ,rompt ,age by using the ,age Explorer bar at the center of the Report Studio window. 84. Clic( the ,age Explorer bar. &ou will see a panel with the structure of your report%

Note that it contains folders for Report ,ages and ,rompt ,ages. &ou can mo"e from page to page within the ,age Explorer. 8>. Clic( ,age 8 under Report ,ages. &ou will again see the page with the items you added to your report. 8?. Clic( the 0ilters button on the toolbar. &ou will see the filters Report Studio has created for the prompts. 12int% to see the entire filter, select it and clic( the Edit MpencilN button5. Clic( O( to close the 0ilters window.
End o Exercise

Cascading Prompts
When you create a Cascading #rompt, your report uses "alues in a pre"ious prompt to filter "alues in a succeeding prompt. 9or example, if your report contains a cascading prompt for ,roduct Type, ,roduct Name, and Description, when you select an item in the ,roduct type prompt box, only the product names for that product type will appear in the next 1 ,roduct name5 box. Ai(ewise, when you select an item in the ,roduct name prompt box, the description for that product will appear in the next 1Description5 box. n the next exercise, you will create a cascading prompt for ,roduct Type, ,roduct Name, and
Copyright 2004-2005 University of Delaware

?8

Cognos Report Studio

Description. &our report will show a product type, the name of a particular product, its description, and cost. Exercise 14#ui&d a Cascading Prompt 8. 6n the Report Studio toolbar, clic( the Ne" button to create a new report. f you are as(ed if you want to sa"e the pre"ious report, clic( 6es. 4. n the Ne" box, select ist and clic( O(.

>. 6n the *odel tab, expand the ,roducts item. Clic( ,roduct type. 'old down the !TR (ey and clic( ,roduct name and Description. ?. Continue to hold down the !TR (ey, expand the Orders item and clic( $nit cost. .rag your selections to the wor( area. B. Clic( the title of the ,roduct type column then, on the toolbar, clic( the &roup7$ngroup button to remo"e duplicate "alues. 2. Clic( the title of the ,roduct type column then hold down the S2I0T (ey and clic( the titles of the ,roduct name and Description columns. C. 6n the toolbar, clic( the Build ,rompt ,age button. <ased on the report items you selected, Report Studio will build a prompt page that loo(s li(e the one below%

This time, the prompt page contains three text boxes, based on the types of items you selected. &ou will next create the cascading prompt. D. Starting at the bottom of the prompt page, clic( inside the Description prompt box. E. n the ,roperties pane, under &eneral, clic( !ascade Source.

Copyright 2004-2005 University of Delaware

?4

Cognos Report Studio

83. Clic( the Ellipsis button and, in the !ascade Source box that appears, use the pull:down arrow to select ,roduct name. Clic( O(. 88. Next, clic( inside the ,roduct name prompt box. 84. n the ,roperties pane, under &eneral, clic( !ascade Source. 8>. Clic( the Ellipsis button and, in the !ascade Source box that appears, use the pull:down arrow to select ,roduct type. Clic( O(. <ecause there are two ways to treat cascading prompt reports, you will now sa"e the report you ha"e created as two separate files so that you can try each way. 8?. 6n the Report Studio window 0ile menu, clic( Sa.e As. 8B. n the Sa"e !s Name box, type your initials Cascading Prompt Multiple. Clic( Sa.e. 82. 6n the Report Studio window 0ile menu, clic( Sa.e As. 8C. n the Sa"e !s Name box, type your initials Cascading Prompt Single. Clic( Sa.e. n the following exercise, you will change the properties in your !ascading ,rompt Single report so that the user can get information for one product at a time. This report should still be open on your screen. Note% When you create a cascading prompt report with your own data, you will be using either a single:"alue or a multiple:"alue cascading prompt 1these terms will become clear as you go through the following exercises5. n that case, you will combine the steps in exercises 8E and 43 1single5 or exercises 8E and 48 1multiple5 to produce the report. The steps are separated here so that we can use the same report items for each exercise and so that you can compare the two types of cascading reports. Exercise "5Create a Sing&e:,a&ue Cascading Prompt 8. 4. n the !ascading ,rompt Single report, clic( inside the ,roduct type prompt box. n the ,roperties pane, under &eneral, clic( *ulti-Select then, using the pull:down arrow, select No.

>. !gain, under &eneral, clic( Auto-Su#mit then, using the pull:down arrow, select 6es. ?. Next clic( inside the ,roduct name prompt box. B. n the ,roperties pane, under &eneral, clic( *ulti-Select then, using the pull:down arrow, select No.

2. !gain, under &eneral, clic( Auto-Su#mit then, using the pull:down arrow, select 6es. C. Run the report. n the Report /ie"er window, you will only see "alues in the ,roduct type prompt box. When you clic( a product type, names of specific product types appear in the Copyright 2004-2005 University of Delaware ?>

Cognos Report Studio

,roduct name box and so on. This is the cascading nature of the prompt. D. n the ,roduct type prompt box, clic( Binoculars.

E. When the "alues for Binoculars appear in the ,roduct name prompt box, clic( See%er <=. 83. n the Description prompt box, clic( the product description for See%er <= and clic( the 0inish button. &our report will loo( li(e the one below%

88. Close the Report /ie"er window. 84. 6n the Report Studio window toolbar, clic( the Sa.e
End o Exercise

button to sa"e the report.

&ou can also create a cascading prompt that will reprompt you to select the next set of "alues once you ha"e selected one set. &ou will create a multiple:"alue prompt in the following exercise. Exercise "1Create a 6u&tip&e:,a&ue Cascading Prompt 8. 6n the Report Studio window 0ile menu, clic( Open. 4. n the Open box, scroll down and open the your initials !ascading ,rompt *ultiple report. &ou will insert prompt buttons into your report that will let you mo"e from prompt to prompt. >. Clic( the ,age Explorer tab in the center of the Report Studio window. ?. Clic( ,rompt ,age 8 to open the prompt page. B. n the Inserta#le O#)ects pane, clic( the Tool#ox tab. Scroll down and clic( ,rompt Button.

2. .rag the ,rompt Button to the right of the ,roduct type prompt box. C. !gain on the Tool#ox tab, clic( ,rompt Button. D. .rag the ,rompt Button to the right of the ,roduct name prompt box. &our prompt page should loo( li(e the one below%

Copyright 2004-2005 University of Delaware

??

Cognos Report Studio

E. Clic( the first ,rompt Button 1it is the box that currently says FNextG5. n the ,roperties pane, under &eneral, clic( Type then, using the pull:down arrow, select Reprompt. 83. Repeat step E for the second ,rompt Button. 88. Run the report. 84. n the ,roduct type prompt box, clic( Binoculars, hold down the S2I0T (ey and clic( !lim#ing Accessories. Clic( the Reprompt button. The "alues for these items will appear in the ,roduct name prompt box. 8>. n the ,roduct name prompt box, clic( 0ire4ly !harger, hold down the !RT (ey and clic( 0ire4ly !lim#ing amp, 0ire4ly Rechargea#le Battery, See%er <=, See%er =9, and See%er Extreme. Clic( the Reprompt button. .escriptions for all the products you selected appear in the Description prompt box. 8?. <elow the Description prompt box, clic( Select All then scroll down 1or use the down: arrow5 and clic( the 0inish button. 1&ou may need to scroll to the right to see the Select All lin( and scroll bac( to the left to see the 0inish button.5 &ou will see a report li(e the one below with a description of each of the products you ha"e selected%

8B. Close the Report /ie"er window.


Copyright 2004-2005 University of Delaware

?B

Cognos Report Studio

82. 6n the Report Studio window toolbar, clic( the Sa.e


End o Exercise

button to sa"e the report.

Optiona& Prompts
With an optional prompt, the user can choose whether or not to select specific information from prompt boxes you include in a report. The next exercise demonstrates the use of optional prompts. Exercise ""(dd an Optiona& Prompt 8. 6n the Report Studio toolbar, clic( the Ne" 4. n the Ne" box, select ist and clic( O(. button to create a new report.

>. 6n the *odel tab, expand the Orders item. Clic( ,roduct name. 'old down the !TR (ey, expand the Returned items folder within the Orders item and clic( Return date. .rag the selected items into the wor( area. ?. Run the report to see the a"ailable data. B. n the Report Studio window, clic( the title of the Return date column and on the toolbar, clic( the Build ,rompt ,age button. <ased on the report item you selected, Report Studio will build a prompt page.

2. Clic( the ,age Explorer tab in the center of the Report Studio window. C. -nder Report ,ages, clic( ,age 8 to open the report page. D. 6n the toolbar, clic( the 0ilters button and select the filter Report Studio has created. E. n the 0ilters window $sage box, clic( Optional then clic( O(.

83. Run the report. The Report /ie"er shows a prompt box that loo(s li(e the one below%

Copyright 2004-2005 University of Delaware

?2

Cognos Report Studio

n the Return date prompt box 0rom area, you can select either a specific date and time or Earliest date and in the To area, you can select either a specific date and time or atest date. 88. n the Return date prompt box 0rom area, clic( the radio button under 0rom and then change the date to Jun 28 2001 1lea"e the time as is5. 84. n the Return date prompt box To area, select atest date. 8>. Clic( 0inish to run the report. The report shows only products returned between Lune 4D, 4338 and the latest date in the report data. 8?. Close the Report /ie"er window. 8B. 6n the Report Studio window 0ile menu, clic( Sa.e As. 82. n the Sa"e !s Name box, type your initials Optional Prompt. Clic( Sa.e.
End o Exercise

)ri&& Throughs
Report Studio allows you to drill through from one report to another report that contains related information. Suppose one of your reports shows product information 1product type, name, introduction date, )uantity, and re"enue5, and you (now that another report lists the retailers who sold those products between 4333 and 4334, their sales targets and actual re"enue. &ou can create a drill:through report so that when someone clic(s on a product name in the first report, they will see the report with the retailer information for that product. To create a drill through, you must ha"e a parent report and a target 1child5 report. n the target report, you create a filter with a parameter that relates to a column in the parent report. The following exercises should ma(e this clear. &ou will first create the target report.

Exercise "*Create a Target !eport 8. 6n the Report Studio toolbar, clic( the Ne" 4. n the Ne" box, select ist and clic( O(. button to create a new report.

>. 6n the *odel tab, expand the Sales targets item. Clic( Retailer name. 'old down the !TR (ey and clic( ,roduct name, Sales year, Sales target, and Actual re.enue. .rag the selected items into the wor( area. ?. Clic( the title of the Retailer name column then, on the toolbar, clic( the &roup7$ngroup button to remo"e duplicate "alues.
Copyright 2004-2005 University of Delaware

?C

Cognos Report Studio

B. Clic( the title of the Sales target item, hold down the !TR (ey and clic( the title of the Actual re.enue item. 6n the toolbar, clic( the Aggregate Total. &our report columns should loo( li(e the ones below% button*s down:arrow. Clic(

&ou will next create a filter with a parameter to ma(e the report the target for another report. 2. 6n the toolbar, clic( the 0ilters C. button. n the 9ilters window, clic( the !dd button.

n the Ta#ular *odel 0ilter window*s A.aila#le !omponents pane, clic( the *odel tab, expand the Sales Targets item, and double:clic( ,roduct name. &our window should now loo( li(e the one below%

D.

n the Expression De4inition pane, following >,roduct name? type


= ?Prodname?

Note% Aea"e a space before and after the e)ual sign. !lso, note that the parameter name you choose 1,rodname, in this case5 can be any meaningful name. Now your window should loo( li(e the one below%

Copyright 2004-2005 University of Delaware

?D

Cognos Report Studio

E. Clic( the /alidate button. When the In4ormation pane reads No errors, clic( O(. Clic( O( a second time to return to the Report Studio window. Now that you*"e done this, the report will use ,rodname as a parameter and will gi"e you results based on ,roduct name. 83. 7i"e the report the title Drill Target. To do this, double:clic( Hust abo"e the report columns on the words that say Dou#le clic% to edit text. n the text box that appears, type Drill Target and clic( O(. Note% This is the way to add a title to any Report Studio report. 88. 6n the Report Studio window 0ile menu, clic( Sa.e As. 84. n the Sa"e !s Name box, type your initials Drill Target. Clic( Sa.e.
End o Exercise

Next, you will create the parent report with a drill through. The parent report will pro"ide a column 1,roduct name5 that will drill through to the target report you Hust created. Exercise "+Create a Parent !eport %ith a )ri&& Through 8. 6n the Report Studio toolbar, clic( the Ne" 4. n the Ne" box, select ist and clic( O(. button to create a new report.

>. 6n the *odel tab, expand the ,roducts item. Clic( ,roduct type. 'old down the !TR (ey and clic( ,roduct name and Introduction date. Continue to hold down the !TR (ey, expand the Orders item and clic( +uantity and Re.enue. .rag the selected items into the wor( area. ?. Clic( the title of the ,roduct type column then, on the toolbar, clic( the &roup7$ngroup button to remo"e duplicate "alues.
Copyright 2004-2005 University of Delaware

?E

Cognos Report Studio

B. Clic( the title of the +uantity item, hold down the !TR (ey and clic( the title of the Re.enue item. 6n the toolbar, clic( the Aggregate button*s down:arrow. Clic( Total.

2. 7i"e the report the title, Drill ,arent. To do this, double:clic( Hust abo"e the report columns on the words that say Dou#le clic% to edit text. n the text box that appears, type Drill Parent and clic( O(. Next, you will use the ,roduct name column as the drill through to get to the target report. C. Select the data portion of the ,roduct name column 1i.e., do not select the column title5. &our wor( area will loo( li(e the one below%

D.

n the ,roperties pane, under Data, double:clic( Drill Throughs. &ou will see a window li(e the one below%

E. Clic( the Add

button. The Drill Throughs window now loo(s li(e the one below%

Copyright 2004-2005 University of Delaware

B3

Cognos Report Studio

83. n the ,roperties pane of the Drill Throughs window, clic( the ellipsis button under Target Report. 88. 9rom the Open box, select your initials Drill Target and clic( Open. &ou will see a box telling you that a parameter has been added. Clic( O(. The parameter 1,rodname5 that you created in the target report now appears below Drill Through in the left pane. 84. -nder the Target Report area, clic( the chec( box next to Open in ne" "indo". The window with the parameter added should loo( li(e the one below%

8>. Clic( the parameter you ha"e Hust added. The window changes to loo( li(e the one below%

Copyright 2004-2005 University of Delaware

B8

Cognos Report Studio

Notice under Target parameter in the #roperties pane, the parameter you created in the Drill Target report is displayed. 8?. The Source -uery item should read ,roduct name. f it does not, select ,roduct name using the pull:down arrow. 8B. Clic( O(. n the Report Studio window, notice that the ,roduct name "alues are now underlined lin(s with a plus sign to the left of each "alue. 82. Run the report. The Report /ie"er columns will loo( li(e the ones below.

#age down to see the rest of the data. 8C. -nder ,roduct name, clic( See%er Extreme. The report runs and a new Report /ie"er window shows the Target Report with more details about the retailers who sold this product.

Copyright 2004-2005 University of Delaware

B4

Cognos Report Studio

#age down to see the rest of the data. 8D. 7o bac( to the first Report /ie"er window 1the Drill ,arent window5 and clic( another product name. Compare the results with those you recei"ed when you clic(ed See%er Extreme. 8E. Close all Report /ie"er windows. 43. 6n the Report Studio window 0ile menu, clic( Sa.e As. 48. n the Sa"e !s Name box, type your initials Drill Parent. Clic( Sa.e.
End o Exercise

!eport -a'outs
Report Studio allows you to lay out your own reports using one or any combination of report formats 1list, chart, crosstab, etc.5 that the software offers. <efore you add any type of )uery to a blan( report, you must set up the layout. This re)uires that you first decide what components your report will contain and what format best suits your data. ! report has three components% #age header The page header is optional. t contains information, such as a title or logo, that you want to appear at the top of e"ery page of your report. #age body The page body is re-uired. t contains the data deri"ed from your )ueries. #age footer The page footer is optional. t contains information, such as a page number or date, that you want to appear at the bottom of e"ery page of your report.

&ou will design your report using tables, much as you would in a word processing or web page de"elopment pac(age. Report Studio offers many table features you are familiar with such as including text, changing text attributes 1color, font, font si+e, etc.5, changing bac(ground color, adding images, nesting obHects, and more.

Copyright 2004-2005 University of Delaware

B>

Cognos Report Studio

n the following exercise, you will become familiar with using Report Studio*s table feature to create a report that combines se"eral types of report formats. Exercise ".Create a !eport -a'out 8. 6n the Report Studio toolbar, clic( the Ne" 4. n the Ne" box, select Blan% and clic( O(. &ou will see a wor( area with the following at its center% FThis page uses flow layout. 6bHects will be arranged top:to:bottom as in a word processing document. .rop obHects here to add them to this page.G >. 6n the Report Studio /ie" menu, "erify that Boundary ines is chec(ed. f it is not, clic( to chec( it. ?. To add a table obHect to the wor( area, on the Inserta#le O#)ects@ Tool#ox tab, clic( Ta#le and drag it to the wor( area. &ou will see a box li(e the one below% button to create a new report.

B. Set the number of columns to ; and the number of rows to 8. $a(e sure that *aximiAe "idth is chec(ed. Clic( O(. &ou will see a table with one row and two columns at the "ery top of the wor( area. n the left table cell, you will place a list report frame. To do this% 2. 6n the Tool#ox tab, clic( ist and drag it into the left table cell. &ou will see a !reate box li(e the one below%

Copyright 2004-2005 University of Delaware

B?

Cognos Report Studio

C.

n the Based on area, ma(e sure Ne" -uery is selected. Clic( O(. &ou will see the familiar list report frame in the left table cell. Next, you will insert a chart frame into the right table cell.

D. 6n the Tool#ox tab, clic( !hart and drag it into the right table cell 1ma(e sure you place it in the table cell which is narrow and at the far right of the wor( area=see below5% OO

!gain you will see a !reate box 1Create P Chart5. E. n the Based on area, ma(e sure Ne" -uery is selected. Clic( O(. &ou will see an Insert !hart box.

83. n the !hart grouping pane, clic( !olumn then in the !hart type pane, clic( !olumn and clic( O(. Now a chart report frame appears to the right of the list report. 9inally, you will add a crosstab frame Hust below the table. 88. 6n the Tool#ox tab, clic( !rossta# and drag it into the wor( area, Hust below the table. !gain you will see a !reate box 1Create P Crosstab5. n the Based on area, ma(e sure Ne" -uery is selected. Clic( O(. &ou will see a !rossta# report frame below the table 1&ou may recall that the original wor( area message said that obHects are placed top:to:bottom. The table and the crosstab are two separate obHects.5 !t this point, your report should loo( li(e the one below%

Copyright 2004-2005 University of Delaware

BB

Cognos Report Studio

Next, you will add )uery items to each report frame. 84. 6n the Inserta#le O#)ects@ *odel tab, expand the !ountries item and clic( !ountry. 'old down the !TR (ey, expand the ,roducts item, and clic( ,roduct line and ,roduct name, expand the Orders item and clic( +uantity. .rag your selections to the ist report. 8>. Clic( the title of the !ountry column and S2I0T-!lic% the title of the ,roduct line column then, on the toolbar, clic( the &roup7$ngroup Next, you will add )uery items to the chart. 8?. !gain on the *odel tab under Orders, clic( +uantity and drag it to the *easures drop +one of the Chart. 8B. Clic( Order year and drag it to the !ategories drop +one of the chart. 82. Clic( Order method and drag it to the Series drop +one of the chart. The chart is now complete. 8C. -nder the *odel tab !ountries item, clic( Sales territory and drag it to the !olumns section of the !rossta# report. 8D. -nder ,roducts, clic( ,roduct type and drag it to the Ro"s section. -nder Orders, clic( Re.enue and drag it to the *easures section. 8E. Run the report. The report should loo( li(e the one below% button to remo"e duplicate "alues.

Copyright 2004-2005 University of Delaware

B2

Cognos Report Studio

Scroll down 1or use the down:arrow5 to see the rest of the information on the report page. To see all the information in the list report, page down. To see the bottom portion of the crosstab report, clic( the Bottom lin(. 43. Close the Report /ie"er window. Note% The )ueries in this report are not lin(ed in any way. &ou will see lin(ed )ueries later in the class. &ou will now add a page header to your report. 48. 6n the Report Studio toolbar, clic( the ,age 2eader B 0ooter button. Chec( the box next to 2eader and clic( O(. &ou will see the page header area at the top of the wor( area. &ou will next drop two bloc(s into the page header. ! bloc( is a rectangular container into which you can place other obHects 1text, images, etc.5. 44. 6n the Inserta#le O#)ects Tool#ox tab, clic( the Bloc% obHect and drag it into the page header area. 4>. Clic( the Bloc% obHect again and drag it slowly until the arrow is beside the first bloc( in the header area. When you see the blac( flashing line beside the first bloc( 1the bloc( icon you are dragging will loo( li(e it is in the wor( area5, release the mouse button. 1<e sure not to drop the second bloc( into the first one.5 &ou will see the second bloc( below the first one. The report wor( area should loo( li(e the one below%

Copyright 2004-2005 University of Delaware

BC

Cognos Report Studio

4?. 6n the Tool#ox tab, clic( Text Item and drag it into the top Bloc%. n the Text box that appears, type Layout Report. Clic( O(. 4B. Select the words ayout Report and then on the toolbar, clic( the 0ont 0ont box, clic( 0oreground !olor. 42. n the 0oreground !olor box, clic( &reen and clic( O(. Clic( O( again. The words ayout Report should still be selected, if they are not, clic( to select them. 4C. Center the words ayout Report. To do this, on the toolbar, clic( the down:arrow next to the !ontainer Alignment selection5. button and clic( the Align Top !enter button 1the middle button. n the

4D. 6n the Tool#ox tab, clic( Text Item and drag it into the second Bloc%. n the Text box that appears, type List, Graph, and Crosstab Reports. 4E. 9ollow steps 4B:4C to change the color and alignment of ist, &raph, and !rossta# Reports. >3. Run the report to see the header. Close the Report /ie"er window. >8. 6n the Report Studio window 0ile menu, clic( Sa.e As. >4. n the Sa"e !s Name box, type your initials Layout Report. Clic( Sa.e.
End o Exercise

n the pre"ious exercise, you became familiar with the parts of a Report Studio layout and learned to create a report using the layout elements. n the following exercise, you will use this (nowledge to create a Crosstab report from scratch. 6nce again, you will set up the layout before you add )ueries. Exercise "0Create a Crosstab !eport rom Scratch
Copyright 2004-2005 University of Delaware

BD

Cognos Report Studio

8. 6n the Report Studio toolbar, clic( the Ne" 4. n the Ne" box, select Blan% and clic( O(.

button to create a new report.

>. 6n the Report Studio menu, select Structure and then clic( ,age 2eader B 0ooter. n the ,age 2eader B 0ooter box, clic( ,age 2eader and ,age 0ooter to add them to your report. Clic( O(. &our report now has its three components% header, body, and footer areas. ?. 6n the Tool#ox tab, clic( Text Item and drag it into the ,age 2eader. n the Text box that appears, type Revenue by Order Method. Clic( O(. B. Center the words Re.enue #y Order *ethod by clic(ing the down:arrow next to the !ontainer Alignment selection5. button and clic(ing the Align Top !enter button 1the middle

Next, you will add a crosstab frame to the body of your report. 2. 6n the Tool#ox tab, clic( !rossta# and drag it into the ,age Body 1the center part of the wor( area5. C. &ou will see a !reate box 1Create P Crosstab5. n the Based on area, ma(e sure Ne" -uery is selected. Clic( O(. Now you will see a !rossta# report frame in the wor( area. D. 6n the Report Studio *odel tab, expand the Orders item, clic( Order method and drag it to the !olumns section of the !rossta# report. Then clic( Re.enue and drag it to the *easures section. E. 0xpand the ,roducts item, clic( ,roduct type and drag it to the Ro"s section. Next, you will add footer information to the report. 83. Clic( the ,age 0ooter area to select it. 88. 6n the Report Studio menu, select Ta#le and clic( Insert Ta#le. n the Insert Ta#le box, set the number of columns to < and the number of rows to 8. $a(e sure that *aximiAe "idth is chec(ed. Clic( O(. &ou will see a table with one row and three columns in the page footer. &ou will first insert a Date obHect into the left column. 84. 6n the Tool#ox tab, clic( the Date obHect and drag it to the left column of the footer table. 8>. 6n the Tool#ox tab, clic( the ,age Num#er obHect and drag it to the middle column of the footer table. Clic( ,age Num#er to select it and then center it as in step B abo"e. 8?. 6n the Tool#ox tab, clic( the Time obHect and drag it to the right column of the footer table. Clic( Time to select it. Clic( the down:arrow next to the !ontainer Alignment
Copyright 2004-2005 University of Delaware

button BE

Cognos Report Studio

and clic( the Align Top Right button 1the last selection in the top row5. 8B. Run the report. &ou will see a window li(e the one below%

&ou may want to change the way some of your report information appears. 9or example, the title is almost unnoticeable at the top of the crosstab report. &ou can add more space inside the page header to separate the title from the contents of the report. 82. n the Report Studio window, clic( inside the ,age 2eader area. 8C. n the ,roperties pane, under Box, double:clic( ,adding. &ou will see a window li(e the one below%

n the box at the bottom of the window, type 20. Aea"e px 1pixels5 as the measurement. Clic( O(. &ou will see an increase in the bottom padding of the page header. 8D. n the page header, clic( the words Re.enue #y Order *ethod then clic( the 0ont button. n the 0ont box, select 8C for the SiAe and Bold for the 'eight. Clic( O(. Note% Report Studio refers to changing attributes li(e font si+e, color, weight, etc. as Styling. 8E. Run the report again and compare the results with those in step 8B abo"e. 23

Copyright 2004-2005 University of Delaware

Cognos Report Studio

43. 6n the Report Studio window 0ile menu, clic( Sa.e As. 48. n the Sa"e !s Name box, type your initials Crosstab from Scratch. Clic( Sa.e.
End o Exercise

(dvanced Techniques
n Report Studio, you can wor( with reports so they loo( exactly as you want them to. &ou can add information to columns, mo"e data from one column to another, add images, bac(ground color, and more. &ou will see some of these techni)ues in the following exercises. n the next exercise, you will create a list report that shows your product names, their introduction dates, descriptions, production cost and the re"enue they ha"e produced. &ou will change the report to consolidate all the product information in one column. Exercise "2Change the Organi;ation o a -ist !eport 8. 6n the Report Studio toolbar, clic( the Ne" 4. n the Ne" box, select ist and clic( O(. button to create a new report.

>. 6n the *odel tab, expand the ,roducts item. Clic( ,roduct name. 'old down the !TR (ey and clic( Introduction date and Description. Continue to hold down the !TR (ey, expand the Orders item and clic( ,roduction !ost and Re.enue. .rag the selected items into the wor( area. ?. 6n the Report Studio toolbar, clic( the $nloc% button.

Note% To insert an item into another obHect 1li(e a list column5, you must first unloc( the item. The $nloc% button is a toggle button=pressing it again will loc( the columns. B. 6n the Inserta#le O#)ects Tool#ox tab, clic( Bloc% and drag it into the ,roduct name column, Hust after the D,roduct nameE data item. 1&ou should see a small blin(ing cursor immediately after the #roduct name item*s final angle brac(et. This is where you drop the bloc(.5 Repeat this process to add a second bloc(. &our ,roduct name column should loo( li(e the one below%

2. Clic( and drag the Introduction date data item 1not the column title5 into the top bloc(.
Copyright 2004-2005 University of Delaware

28

Cognos Report Studio

C. Clic( and drag the Description data item 1not the column title5 into the lower bloc(. &our wor( area should loo( li(e the one below%

D. Clic( one of the empty Introduction date cells 1not the title cell5 and clic( the Delete button. The whole column disappears. Repeat this process for the Description column. E. Now your wor( area loo(s li(e the one below%

83. Clic( the ,roduction cost data item 1Q,roduction costI5. Then clic( the !ontainer Alignment button and clic( the Align *iddle !enter button 1the middle selection in the second row of choices5. Repeat this process for the Re.enue data item. 88. Select the title of the ,roduct name column then clic( the Delete button. To add a new column title, you must first drag a text item into the title area. 84. 6n the Tool#ox tab, clic( the Text Item and drag it into blan( title area 1the area from which you deleted F#roduct nameG5. n the Text box that appears, type Our ,roducts and clic( O(. 8>. Run the Report. The Report /ie"er window should loo( li(e the one below%

Copyright 2004-2005 University of Delaware

24

Cognos Report Studio

8?. 6n the Report Studio window 0ile menu, clic( Sa.e As. 8B. n the Sa"e !s Name box, type your initials Advanced Techniques. Clic( Sa.e.
End o Exercise

!nother ad"anced techni)ue allows you to add styling at a higher le"el than that of indi"idual report items, column titles, etc. When you use this techni)ue, the styling applies to all items of a gi"en type 1list, list or crosstab column, table, page, and so on5. $oreo"er, when you add styling at a higher le"el, any new items added to your report will automatically ha"e the style of the rest of the report. Exercise "3(dd St'&ing at a <igher -eve& 8. 6n the Report Studio menu, clic( Open to open an existing report 1in this case, the first report you created for this class5. f you are as(ed if you want to sa"e the pre"ious report, clic( 6es. 4. n the Open box, scroll down to the report your initials Retailer Re.enue. Clic( the report to select it and clic( Open.

>. Clic( the Retailer name data item QRetailer nameI 1not the column title5 to select it. !t the top of the #roperties pane, you will see an up:arrow beside the words FAist Column.G This up:arrow is called the Ancestor button. To add styling at a higher le"el, you must wor( with the ancestor 1parent5 of a particular item. ?. Clic( the Ancestor button. &ou will see a box li(e the one below%

Copyright 2004-2005 University of Delaware

2>

Cognos Report Studio

B. Clic( ist !olumns 1second item from the bottom5. Notice that the words beside the Ancestor button now read ist !olumns and all the list columns are selected. 2. n the ,roperties pane, under !olor B Bac%ground, double:clic( Bac%ground !olor. Clic( Sil.er and Clic( O(. The bac(ground of all the list columns changes to sil"er.

C. Clic( any of the column titles. Clic( the Ancestor button and, from the box that appears, clic( ist !olumn Titles 1second item from the bottom5. D. n the ,roperties pane, under !olor B Bac%ground, double:clic( Bac%ground !olor. Clic( A-ua and clic( O(. The bac(ground of all the list column titles changes to a)ua.

E. Clic( the Retailer name column title, hold down the !TR (ey and clic( the ,roduct type column title. Clic( the &roup7$ngroup button to remo"e duplicate "alues.

83. Run the report to see that the styling applies to all the columns. Next you will see the effect of adding a new list item to your report. 88. n the Report Studio Inserta#le O#)ects pane, under Orders, clic( Order method and drag it between the ,roduct type and +uantity columns. When you see the flashing blac( bar, release the mouse button. 84. Run the report again. The new item shares the styling of the other columns because styling was applied at a higher le"el. &ou can use this method to change any styling feature 1color, alignment, etc.5 for any report. 8>. 6n the Report Studio window toolbar, clic( the Sa.e
End o Exercise

button to sa"e the report.

Report Studio also allows you to add images and annotations to your reports. To illustrate this process, you will use the !rossta# 4rom Scratch report you created earlier. Exercise "4(dd an Image or (nnotate a Crosstab !eport 8. 6n the Report Studio 0ile menu, clic( Open to open an existing report. 4. n the Open box, scroll down to the report your initials !rossta# 4rom Scratch. Clic( the report to select it and clic( Open. !t the top left of your report 1at the intersection of Order method and ,roduct type5 is a blan( white space. &ou can insert obHects into this cell. >. Clic( inside the white space then in the ,roperties pane under !olor B Bac%ground, double:clic( Bac%ground Image. ?. n the Bac%ground Image box for the Image $R , type
..\samples\images\cube.gif
Copyright 2004-2005 University of Delaware

2?

Cognos Report Studio

Clic( O(. &ou will see a security box regarding nonsecure items. Clic( 6es. B. Run the report. The Report /ie"er window should loo( li(e the one below%

2.

n the Report Studio window ,roperties pane, double:clic( Bac%ground Image. 'ighlight the -RA you typed pre"iously, delete it, and clic( O(. The space from which you deleted the image should remain highlighted.

C. 9rom the Inserta#le O#)ects pane Tool#ox tab, clic( and drag a Text Item into the highlighted space. n the Text box that appears, type
Product Revenue

Clic( O(. D. Run the report. The Report /ie"er window should loo( li(e the one below%

&ou won*t be sa"ing this report.


End o Exercise

!eport Studio =ueries


n order to wor( with Report Studio )ueries, you must first understand how the program handles data and structures its )ueries. Report Studio begins with a ta#ular model=an obHect you use to select )uery items for a report. The tabular model defines a simple list of items. ! tabular model data item is a column in your database. The second aspect of the )uery is a cu#e de4inition. The cube consists of dimensions, facts, and filters. .imensions group aspects of your information and contain hierarchical le"els. 9or instance, when you group data in a report, that data is placed into a hierarchy of le"els. &ou are, in effect, creating a dimension. 9acts in the cube are references to data items in the tabular model. 9ilters eliminate groups of rows from the tabular structure before aggregates are computed. Report Studio uses the cube elements to create dimensions and to calculate the aggregate "alues for le"els you ha"e defined. t calculates the "alues that ha"e been fed in from the tabular model. This should become clearer as you wor( through the following exercises. Exercise *5Exp&ore the !eport Studio Tabu&ar 6ode&

Copyright 2004-2005 University of Delaware

2B

Cognos Report Studio

8. 6n the Report Studio toolbar, clic( the Ne" button to create a new report. f you are as(ed if you want to sa"e the pre"ious report, clic( No. 4. n the Ne" box, select ist and clic( O(.

>. 6n the *odel tab, expand the ,roducts item. Clic( ,roduct type. 'old down the !TR (ey and clic( ,roduct name. Continue to hold down the !TR (ey, expand the Orders item, and clic( Order method and Re.enue. .rag the selected items into the list frame. ?. Run the report. Notice that each row of the report has been totaled against the product type, product name, and order method.

B.

n the Report Studio window, mo"e the mouse pointer o"er the +uery Explorer bar the center of the page. &ou will see the )uery you ha"e created in the report%

at

2. Clic( +uery8 1the lin( beside the cube5. &ou will see a page li(e the one below%

The page has ? frames. The bottom frame, the Ta#ular Data frame, contains the Ta#ular *odel. The top > frames 1Dimensions, 0acts, and 0igures5 comprise the cube definition. C. .ouble:clic( the Ta#ular *odel icon in the Ta#ular Data frame. Now you see a page with three frames% Data Items, 0ilters, and !hildren. The Ta#ular *odel is a list of items%
Copyright 2004-2005 University of Delaware

22

Cognos Report Studio

f you examine the list, you will notice that Re.enue has an !ggregate symbol o"er its icon, while the other three items are grouped. The creator of the pac(age for this model specified that Re.enue should be totaled. <ecause there were no such specifications for the other three items, they are grouped by default. t is the Auto &roup B SummariAe property in the Ta#ular *odel that determines whether the )ueries in the tabular model are grouped and aggregated. f property is set to No, you will get only details in your report. D. n the ,roperties pane for the Ta#ular *odel, double:clic( Auto &roup B SummariAe to change the setting to No.

E. Run the report. Since grouping and aggregation ha"e been turned off, you are loo(ing at indi"idual detail rows from the database%

83. n the Report Studio window, mo"e your mouse pointer o"er the ,age Explorer bar the center of the page. 88. Clic( ,age 8 to return to your report page. 84. Clic( the title of the Re.enue column then, on the toolbar, clic( the Aggregate down:arrow. Clic( Total. Now the wor( area shows a single total at the end of the list.

at

button*s

8>. Run the report. n the Report /ie"er window, clic( the Bottom lin( to go to the bottom of the report. Notice that there is a single total for the detail lines in the report=there is still no grouping because Auto &roup B SummariAe is set to No. 8?. 6n the Report Studio toolbar, clic( the $ndo button to remo"e the total from Re.enue.

Copyright 2004-2005 University of Delaware

2C

Cognos Report Studio

8B. Clic( the title of the ,roduct type column. 'old down the !TR (ey and clic( the titles of the ,roduct name and Order method columns. Then, on the toolbar, clic( the &roup7$ngroup button.

&our wor( area now loo(s li(e the one below%

82. Run the report. The Report Studio window loo(s li(e the one below%

This loo(s something li(e a grouped report, but since Auto &roup B SummariAe is set to No, we still see data for the detail rows in the report. #age down a few pages to see how the report is structured. Clic( the Bottom lin( to go to the bottom of the report. &ou will see that there is no aggregation. 8C. Clic( the title of the Re.enue column then clic( the Aggregate Clic( Total. button*s down:arrow.

8D. Run the report. n the Report /ie"er window, clic( the Bottom lin( to go to the bottom of the report. Now there are group totals and the total for the whole report, but they are still against the unaggregated data 1detail rows5. 8E. n the Report Studio window, mo"e the mouse pointer o"er the +uery Explorer bar 1as in step B abo"e5. Clic( the Ta#ular *odel lin(. 43. n the ,roperties pane for the Ta#ular *odel, double:clic( Auto &roup B SummariAe to change the setting to 6es. 48. Run the report. Now the groups are summari+ed because Auto &roup B SummariAe is set to 6es% 2D

Copyright 2004-2005 University of Delaware

Cognos Report Studio

f you page down a few pages and then go to the bottom of the report, you will see that the rows are summari+ed and each le"el is totaled. 44. 6n the Report Studio file menu, clic( Sa.e As. 4>. n the Sa"e !s Name box, type your initials Tabular Model. Clic( Sa.e. Now that you ha"e seen how the structure of the Ta#ular *odel is determined, you will loo( at the cube definition. Remember that "alues from the Ta#ular *odel are fed into the cube to produce the report. Exercise *1Wor> %ith the !eport Studio Cube )e inition 8. 6n the Report Studio toolbar, clic( the Ne" 4. n the Ne" box, select ist and clic( O(. button to create a new report.

>. 6n the *odel tab, expand the ,roducts item. Clic( ,roduct type. 'old down the !TR (ey and clic( ,roduct name. Continue to hold down the !TR (ey, expand the Orders item, and clic( Order method and +uantity. .rag the selected items into the list frame. ?. Run the report. Notice that each row of the report has been totaled against the product type, product name, and order method.

B.

n the Report Studio window, mo"e the mouse pointer o"er the +uery Explorer bar the center of the page.

at

2. Clic( +uery8 1the lin( beside the cube5. &ou will see the )uery you ha"e created in the report. The three columns at the top of the page show the cube definition%

Since you ha"e not grouped any items, there are no dimensions in the report.

Copyright 2004-2005 University of Delaware

2E

Cognos Report Studio

C.

n the Report Studio window, mo"e your mouse pointer o"er the ,age Explorer bar the center of the page.

at

D. Clic( ,age 8 to return to your report page. E. Clic( the title of the ,roduct type column. 'old down the !TR (ey and clic( the titles of the ,roduct name and Order method columns. Then, on the toolbar, clic( the &roup7$ngroup button.

83. Run the report. The results should be familiar to you as those of a grouped report. 88. Repeat steps B and 2 abo"e to again see the cube definition. <ecause you ha"e grouped some list items, your definition now loo(s li(e the one below%

The grouped items now appear in the Dimensions area. The report has one dimension, indicated by the icon. There are three hierarchical le"els 1 ,roduct type, ,roduct name, and Order method5, indicated by the icons. <y default, the Dimension and the first le"el share the same name. Within each le"el are categories, indicated by a (ey . 84. To see the (eys, clic( the plus sign beside each of the le"els. &ou cube definition now loo(s li(e the one below%

The categories, represented by the (eys, contain the "alues from the database. 8>. Repeat steps C and D abo"e to return to the Report Studio report page. 8?. Clic( the title of the +uantity column then clic( the Aggregate Clic( Total. button*s down:arrow.

8B. Run the report. n the Report /ie"er window, clic( the Bottom lin(. !t its bottom, the report should loo( li(e the one below%

Copyright 2004-2005 University of Delaware

C3

Cognos Report Studio

Notice that each group now has a total and there is a summary total for the entire report. 82. 6n the Report Studio window 0ile menu, clic( Sa.e As. 8C. n the Sa"e !s Name box, type your initials Cube Definition. Clic( Sa.e.
End o Exercise

6aster:)etai& !eports
n the following exercise, you will create a master report that contains information on orders for your company, including order numbers, the sales representati"e who placed the order, and the order date. &ou will then create a report inside the master report that includes details for each order number, including the order number, product name, )uantity purchased and re"enue. &ou will lin( the two reports to create a single report. Exercise *"Create a 6aster:)etai& !eport 8D. 6n the Report Studio toolbar, clic( the Ne" 8E. n the Ne" box, select Blan% and clic( O(. 43. 6n the Report Studio /ie" menu, "erify that Boundary ines is chec(ed. f it is not, clic( to chec( it. 48. 6n the Inserta#le O#)ects pane Tool#ox tab, clic( ist and drag it into the wor( area. &ou will see a !reate - ist box li(e the one below% button to create a new report.

Copyright 2004-2005 University of Delaware

C8

Cognos Report Studio

44. n the Based on area, ma(e sure Ne" -uery is selected. Clic( O(. 4>. 6n the *odel tab, expand the Orders item. Clic( Order date. 'old down the !TR (ey, expand the Sales reps item and clic( Sta44 name. Continue to hold down the !TR (ey, and in the Orders item, clic( Order num#er: .rag the selected items into the wor( area. &ou will next create a second )uery inside the first one. 4?. 6n the Report Studio toolbar, clic( the $nloc% button.

4B. 6n the Tool#ox tab, clic( ist: .rag it to the Order num#er column and drop it Hust after the first Order num#er data item 1Q6rder numberI5 when you see the small flashing blac( line. 42. &ou will see a !reate box 1!reate F ist5 for the second )uery. n the Based on area, ma(e sure Ne" -uery is selected. Clic( O(. &our wor( area should loo( li(e the one below%

&ou will next add items to the list you ha"e Hust created.

Copyright 2004-2005 University of Delaware

C4

Cognos Report Studio

4C. 6n the *odel tab, expand the Orders item. Clic( Order num#er. 'old down the !TR (ey and clic( ,roduct name, +uantity and Re.enue. .rag the selected items into the second list frame. &our wor( area should loo( li(e the one below%

&ou will now lin( the two reports in a master:detail relationship. 4D. 9rom the Report Studio Data menu, clic( *aster7Detail Relationships. &ou will see a box li(e the one below%

&ou will first define the *aster +uery for your report. 4E. $a(e sure +uery8 is showing in the *aster -uery pull:down box. Then clic( the Add button. &ou will see a box li(e the one below%

>3. n the Add box, clic( the radio button next to 0iltered detail -uery and clic( O(.
Copyright 2004-2005 University of Delaware

C>

Cognos Report Studio

&ou will next see a !hoose Detail +uery box li(e the one below%

>8. 'ighlight +uery; and clic( O(. &ou will see a *aster Detail in% 0ilter box li(e the one below%

>4. -nder 0acts in +uery8, clic( Order num#er and drag it into the Expression De4inition pane. >>. n the Expression De4inition pane, type an e-ual sign after >Order num#er?. >?. -nder +uery;, clic( Order num#er and drag it into the Expression De4inition pane following the e)ual sign. &our expression should loo( li(e the one below% >+uery8?:>Order num#er?G>+uery;?:>Order num#er? >B. Clic( the /alidate button. When the In4ormation pane reads No errors, clic( O(.

>2. &ou will again see the *aster Detail Relationships box that now shows the $aster:.etail relationship you ha"e defined. Clic( O(. Run the report. The Report /ie"er window should loo( li(e the one below%

Copyright 2004-2005 University of Delaware

C?

Cognos Report Studio

The $aster:.etail report shows the order information combined with details about each order number. >C. 6n the Report Studio window 0ile menu, clic( Sa.e As. >D. n the Sa"e !s Name box, type your initials Order Master-Detail. Clic( Sa.e. &ou can clean up the report by eliminating the repetition of the order number. To do this% >E. n the Detail report, clic( the bac(ground 1i.e., not on any of the words5 of the Order num#er column and clic( the !ut button.

?3. Run the report. The Report /ie"er window should loo( li(e the one below%

Now the Order num#er is listed once with the details underneath. 'ere is why this wor(s% &ou may remember that if you cut an item in Report Studio, it remains in the Query 1Query45. Thus, the data=although hidden=is still a"ailable to maintain the lin( between the *aster and Detail )ueries. 0"en if you sa"e and reopen the report, the item remains in the )uery and you can drag it bac( into the report at any time.
Copyright 2004-2005 University of Delaware

CB

Cognos Report Studio

&ou can also add filters to $aster:.etail reports. Suppose, for example, that you wanted to eliminate all the product names for types of binoculars from your report. &ou can create a filter so that you will see all product names except those for binoculars. n the next exercise, you will add a filter to a $aster:.etail report. $a(e sure that the 6rder $aster:.etail report is still open. Exercise **(dd a 1i&ter to a 6aster:)etai& !eport 8. 6n the Report Studio 0ile menu, clic( Sa.e As. 4. n the Sa"e !s Name box, type your initials Order Master-Detail Filtered. Clic( Sa.e. &ou will add the filter to the Detail report 1Query45.

>. $o"e your mouse pointer o"er the +uery Explorer bar at the center of the Report Studio page. &ou will see the )ueries you ha"e created in report%

?. Clic( +uery; 1the lin( beside the cube5. &ou will see the cube definition for your page. B. 6n the Inserta#le O#)ects pane Tool#ox tab, clic( the 0ilters item and drag it to the 9ilters section of the cube definition. This opens a &roup 0ilter box in which you can add an expression for the filter. &ou will create a filter to eliminate binoculars from your report. 2. Type the following in the 0xpression .efinition area% [Product name] not in ('Seeker 35','Seeker 50','Seeker Extreme','Seeker Mini') Note% 0ach item within the parentheses must be enclosed in single )uotes and items are separated by commas. !lso, there can be no spaces between items in parentheses. &our window should loo( li(e the one below%

Copyright 2004-2005 University of Delaware

C2

Cognos Report Studio

C. Clic( the /alidate button to "alidate the expression. When the In4ormation area reads FNo 0rrors,G clic( O(. D. Run the report. &ou will not see any instances of the binocular names you ha"e filtered out. E. 6n the Report Studio menu, clic( Sa.e to sa"e the report.
End o Exercise

Parent:Chi&d !eports
n the following exercise, you will create a parent report that contains information on orders for your company, including order numbers, retailer names, product names, )uantity, and unit price. &ou will then create a child report that includes details for staff names, retailer names, product names, actual re"enue, and sales target. &ou will Hoin the )ueries to produce a report that shows orders in )uantities greater than 83. The report will also show that information for a particular sales person, including the re"enue generated by the sale. Exercise *+Create a Parent:Chi&d !eport 8. 6n the Report Studio toolbar, clic( the Ne" 4. n the Ne" box, select Blan% and clic( O(. button to create a new report.

>. 6n the Report Studio /ie" menu, "erify that Boundary ines is chec(ed. f it is not, clic( to chec( it. ?. 6n the Inserta#le O#)ects pane Tool#ox tab, clic( ist and drag it into the wor( area. &ou will see a !reate - ist box li(e the one below%

Copyright 2004-2005 University of Delaware

CC

Cognos Report Studio

B.

n the Based on area, ma(e sure Ne" -uery is selected. Clic( O(.

2. 6n the *odel tab, expand the Orders item. Clic( Order num#er. 'old down the !TR (ey and clic( Retailer name, ,roduct name, +uantity and $nit price: .rag the selected items for the #arent )uery into the wor( area. &ou will next create the Child )uery.

C. $o"e your mouse pointer o"er the +uery Explorer bar at the center of the Report Studio page. &ou will see the )uery you ha"e created in the report%

D. Clic( Ta#ular *odel. E. 6n the Inserta#le O#)ects pane Tool#ox tab, clic( Ta#ular *odel and drag it into the !hildren area at the bottom of the wor( area. Note that Report Studio names this Ta#ular *odel1. 83. .ouble:clic( the Ta#ular *odel1 icon to open the wor( area for the Child )uery. 88. 6n the *odel tab, expand the Sales targets item. Clic( Sta44 name. 'old down the !TR (ey and clic( Retailer name, ,roduct name, Actual Re.enue and Sales target. .rag the selected items into the Data Items area of Ta#ular *odel1. The wor( area should loo( li(e the one below%

Copyright 2004-2005 University of Delaware

CD

Cognos Report Studio

&ou will next drag the items you want to filter to the 0ilters area at the right side of the window and set the criteria on which you want to filter. 84. 9rom the Ta#ular *odel1 Data Items list, clic( Sta44 name and drag it to the 0ilters area at the right side of the window. This opens the Ta#ular *odel 0ilter window. n the Expression De4inition pane, after MStaff nameN, type = Bart Scott &ou will see a box li(e the one below%

Copyright 2004-2005 University of Delaware

CE

Cognos Report Studio

Clic( O(. 8>. $o"e your mouse pointer o"er the +uery Explorer bar at the center of the Report Studio page. n the +uery Explorer box, clic( Ta#ular *odel. &ou will see the data items you added for the #arent Query. &ou will next drag the items you want to filter to the 0ilters area at the right side of the window and set the criteria on which you want to filter. 8?. 9rom the Ta#ular *odel Data Items list, clic( +uantity and drag it to the 0ilters area at the right side of the window. This opens the Ta#ular *odel 0ilter window. n the Expression De4inition pane, after MQuantityN, type >10 and clic( O(. Next you will add a filter for the item from the #arent Query 1Tabular $odel5 that you want to Hoin to the Child Query 1Tabular $odel85. 8B. 9rom the Ta#ular *odel Data Items list, clic( ,roduct name and drag it to the 0ilters area at the right side of the window. This opens the Ta#ular *odel 0ilter window. 82. n the Expression De4inition pane, after M#roduct nameN, type G 8C. Still in the Ta#ular *odel 0ilter window, clic( the +uery Items tab at the bottom of the left pane. &our window will loo( li(e the one below.

8D. -nder Ta#ular *odel8, double:clic( ,roduct name: The expression in the 0xpression .efinition pane should loo( li(e the one below% >,roduct name?G>Ta#ular model1?:>,roduct name?
Copyright 2004-2005 University of Delaware

D3

Cognos Report Studio

Clic( O(. 8E. 6n the Inserta#le O#)ects pane Tool#ox tab, clic( +uery Items. .rag all the items under Ta#ular *odel1 to the Data Items section of the wor( area. 43. $o"e your mouse pointer o"er the +uery Explorer bar at the center of the Report Studio page. n the +uery Explorer box, clic( +uery8. 48. 6n the Inserta#le O#)ects pane Tool#ox tab, clic( +uery Items. .rag all the items that are not already in the 0acts section of the wor( area to that section. &our wor( area will loo( li(e the one below%

44. $o"e your mouse pointer o"er the +uery Explorer bar at the center of the Report Studio page. n the +uery Explorer box, clic( +uery8 again. 4>. n the ,roperties pane at the lower left of the window, scroll down and clic( !ross ,roduct Allo"ed: 9rom the pull:down menu, select Allo". 4?. Clic( the ,age Explorer bar in the middle of the Report Studio window and clic( ,age8. 4B. 6n the Inserta#le O#)ects pane +uery Items tab, double:clic( each item that is not already in the wor( area. &our wor( area will loo( li(e the one below%

Copyright 2004-2005 University of Delaware

D8

Cognos Report Studio

42. 6n the Report Studio window 0ile menu, clic( Sa.e As. 4C. n the Sa"e !s Name box, type your initials Parent-Child. Clic( Sa.e. 4D. &ou can clean up the report by eliminating the repetition of the ,roduct Name. To do this% 4E. n the Detail report, clic( the bac(ground 1i.e., not on any of the words5 of the ,roduct name8 column and clic( the !ut button.

>3. Run the report. The Report /ie"er window should loo( li(e the one below%

Close the Report /ie"er window. >8. 6n the Report Studio window 0ile menu, clic( Sa.e.
End o Exercise

Create an Invoice
&ou will next create an in"oice using the data from 76 Sales and Retailers. The purpose of this exercise is to show you how to ha"e the greatest control o"er your reports by defining the )uery and controlling how the report pages will be handled. The in"oice incorporates such features as calculations, number formatting, styling on high le"els and more. &ou will become aware of Report Studio best practices as you mo"e through the exercise. When you finish the exercise, your in"oice should loo( li(e the one below%

Copyright 2004-2005 University of Delaware

D4

Cognos Report Studio

f you loo( at the example abo"e, you notice that there is information at the top 1in the page header5 that will appear on e"ery in"oice. The rest of the information appears in the page body. There is no page footer. <efore you construct your in"oice, you will define a )uery and then associate your page with a )uery item 16rder number5. The purpose of doing this is to ha"e a new in"oice page begin each time there in a new in"oice 16rder5 number. Exercise *.Create a =uer' or an Invoice 8. 6n the Report Studio toolbar, clic( the Ne" 4. n the Ne" box, select Blan% and clic( O(. To create the )uery for your page% >. Clic( the +uery Explorer bar in the middle of the Report Studio window and clic( +ueries% button to create a new report.

?. 6n the Inserta#le O#)ects Tool#ox tab, clic( the +uery item and drag it to the wor( area.

B. .ouble:clic( the +uery

icon to open it. &ou will see a )uery page with no data.

Copyright 2004-2005 University of Delaware

D>

Cognos Report Studio

2. 6n the Inserta#le O#)ects Tool#ox tab, clic( the Ta#ular *odel obHect and drag it into the Ta#ular Data frame at the bottom of the )uery page. C. .ouble:clic( the Ta#ular *odel item &ou will next add a data item from the 76 Sales and Retailers pac(age model directly into the )uery. D. 6n the Inserta#le O#)ects *odel tab, under Orders, clic( Order num#er and drag it into the Data Items frame. E. Clic( the +uery Explorer bar in the middle of the Report Studio window and clic( +uery8. &ou will see the )uery page with the tabular model you added and the empty cube definition frames at the top. 83. 6n the Inserta#le O#)ects +uery Items tab, clic( Order num#er and drag it into the Dimensions frame. Note% $a(e sure that you drag the +uery Items 6rder number item and not the 6rder number from the $odel tab. Report Studio creates a Dimension that loo(s li(e the following 1clic( the plus signs to see the entire dimension5%

&ou will next associate your report page with the Order num#er )uery item. !fter you ha"e done this, Report Studio will begin a new in"oice page each time the order number changes. 88. Clic( the ,age Explorer bar in the middle of the Report Studio window and clic( Report ,ages 1the lin( next to the folder5.

&ou will see a ,ages box li(e the one below%

Copyright 2004-2005 University of Delaware

D?

Cognos Report Studio

84. Clic( ,age8 to highlight it and then clic( the ,age Brea%s box. &ou will see a box li(e the one below%

button at the bottom of the

8>. -sing the pull:down arrow under Brea% pages using this -uery, select +uery8. Then clic( the radio button next to ,age #rea%s #y grouping le.el 1recommended3 and chec( the box next to Order num#er. The ,age Brea%s box should now loo( li(e the one below%

Copyright 2004-2005 University of Delaware

DB

Cognos Report Studio

8?. Clic( O(. This will return you to the ,ages box which now shows ,age 8 associated with the Order num#er item%

8B. Clic( O(. 82. 6n the Report Studio window 0ile menu, clic( Sa.e As. 8C. n the Sa"e !s Name box, type your initials Invoice. Clic( Sa.e.
End o Exercise

Now that you ha"e structured the report )uery, in the next exercise, you will build the page header for your report. This is the recommended procedure for building reports if you start with a blan( page. 9irst define the )uery and then build the page starting with the page header, progressing to the page body, and ending with the page footer 1if there is to be one5. &ou should still be in the your initials In.oice file. Exercise *0#ui&d the Invoice Page <eader 8. Clic( the ,age Explorer bar in the middle of the Report Studio window and clic( ,age8. &ou will see a blan( wor( area.
Copyright 2004-2005 University of Delaware

D2

Cognos Report Studio

f you loo( at the sample n"oice on page CB, you notice that the page header contains in"oice information, the date, a logo, address and phone number. 4. 9rom the Report Studio Structure menu, select ,age 2eader B 0ooter. >. n the ,age 2eader B 0ooter box, chec( the box next to 2eader and clic( O(. &ou will see the page header frame at the top of the wor( area. Report Studio Best ,ractice% When you create a report, first identify any hori+ontal bands that will extend the width of your report. 'ori+ontal bands suggest that you should use a bloc( obHect to contain your information. f there are no hori+ontal bands, loo( for "ertical bands. @ertical bands suggest a table obHect as a container for your information.

Aoo( at the sample in"oice. There is no information that extends across the entire header. There are two "ertical bands of information 1the in"oice information and the -ni"ersity information5, so you will add a table obHect to the header. ?. 6n the Inserta#le O#)ects Tool#ox tab, clic( the Ta#le obHect and drag it into the page header. n the Insert Ta#le box, set up the table to be ; columns and 8 ro". Clic( the radio button next to *aximiAe "idth and clic( O(. &ou will see the table frame inside the page header area. Aoo( at the sample in"oice. 0ach table cell contains bands of hori+ontal information 1information that extends across the cell5. To add the information, you will first add bloc(s to contain it. The in"oice information on the left has > lines 1bands5 and re)uires > bloc(s. The information on the right re)uires ? bloc(s. B. 6n the Inserta#le O#)ects Tool#ox tab, clic( the Bloc% obHect and drag it into the left table cell. Repeat this process to add two more bloc(s 1when you drag the second and third bloc(s into the cell, wait till you see the small flashing line at the end of the pre"ious bloc( to release the mouse button5. 2. 6n the Inserta#le O#)ects Tool#ox tab, clic( the Text Item o#)ect and drag it into the top bloc(. n the Text box that appears, type INVOICE. Clic( O(. C. Clic( the word IN/OI!E to select it and, in the ,roperties pane, double:clic( 0ont. 9or the SiAe select <C pt and for the 'eight, select Bold. Clic( O(. D. 6n the Inserta#le O#)ects Tool#ox tab, clic( the Text Item o#)ect and drag it into the second bloc(. n the Text box that appears, type Invoice No.: . 1<e sure to include the space after the colon.5 Clic( O(. E. 6n the Inserta#le O#)ects +uery tab, clic( the Order num#er (ey%

Copyright 2004-2005 University of Delaware

DC

Cognos Report Studio

.rag it beside the In.oice No:H text you Hust added in the second bloc(. 83. 6n the Inserta#le O#)ects Tool#ox tab, clic( the Text Item o#)ect and drag it into the third bloc(. n the Text box that appears, type Date: . 1<e sure to include the space after the colon.5 Clic( O(. 88. 6n the Inserta#le O#)ects Tool#ox tab, clic( the Date obHect and drag it beside the DateH text you Hust added to the third bloc(. The left page header cell should now loo( li(e the one below%

84. 6n the Report Studio 0ile menu, clic( Sa.e to sa"e your report. 8>. 6n the Inserta#le O#)ects Tool#ox tab, clic( the Bloc% obHect and drag it into the right table cell. Repeat this process to add three more bloc(s 1when you drag the second, third, and fourth bloc(s into the cell, wait till you see the small flashing line at the end of the pre"ious bloc( to release the mouse button5. 8?. 6n the Inserta#le O#)ects Tool#ox tab, clic( the Image obHect and drag it into the top bloc(. Select the Image obHect and, in the ,roperties pane, double:clic( $R . n the box that appears, type
..\samples\images\logo.jpg

Clic( O(. 8B. 6n the Inserta#le O#)ects Tool#ox tab, clic( the Text Item o#)ect and drag it into the second bloc(. n the Text box that appears, type University of Delaware. Clic( O(. 82. 6n the Inserta#le O#)ects Tool#ox tab, clic( the Text Item o#)ect and drag it into the third bloc(. n the Text box that appears, type Newark, DE 19716. Clic( O(. 8C. 6n the Inserta#le O#)ects Tool#ox tab, clic( the Text Item o#)ect and drag it into the fourth bloc(. n the Text box that appears, type (302)831-2791. Clic( O(. 8D. Select any bloc( in the right table cell. 6n the ,roperties pane, clic( the Ancestor and clic( Ta#le !ell. button

8E. n the Ta#le !ell ,roperties pane, clic( 2oriAontal Alignment and, from the pull:down menu, select Right. The right table cell should loo( li(e the one below%
Copyright 2004-2005 University of Delaware

DD

Cognos Report Studio

&ou will next set the font style for your entire in"oice report. 43. Select any of the text items you added to the page header. 6n the ,roperties pane, clic( the Ancestor button and clic( ,age. 48. n the ,age ,roperties pane, double:clic( 0ont and, for 0amily, select Arial and clic( O(. Report Studio Best ,ractice% !pply styling at the highest possible le"el in your report. This way, you set such things as font family, weight, color, etc. once and the setting will apply to all li(e items in your report. 44. Clic( the bac(ground area of the left table cell. 6n the ,roperties pane, clic( the Ancestor button and clic( ,age 2eader. 4>. n the ,age 2eader ,roperties pane, double:clic( Border. 9or !olor, select Blue, for Style, select Solid line, and for 'idth, select 8pt. Clic( the bottom border on the diagram and clic( O(. 4?. n the ,age 2eader ,roperties pane, double:clic( ,adding. Set the bottom padding to 89px and clic( O(. 4B. Sa"e your report and run it to see the page header you ha"e created. #age down in the report. &ou will notice that the in"oice number changes as you go through the pages. The next step is to create the body of the in"oice. f you loo( at the sample in"oice on page CB, you will notice that there are two hori+ontal bands in the body=the sales information rows and the product information rows. While the information at the bottom of the in"oice 1No Returns Without Receipt, etc.5 loo(s li(e a page footer, it is not. t is part of the second band of information. Exercise *2Create the Invoice Page #od' 8. 6n the your initials In.oice report*s Inserta#le O#)ects Tool#ox tab, clic( the Bloc% obHect and drag in into the page body wor( area. Repeat this process to add a second bloc( 1when you drag the second bloc( into the wor( area, wait till you see the small flashing line at the end of the pre"ious bloc( to release the mouse button5. Note on the sample in"oice on page CB that the first bloc( has > "ertical bands, this means that you should insert a table into the first bloc(. 4. 6n the Inserta#le O#)ects Tool#ox tab, clic( the Ta#le obHect and drag in into the top bloc(.
Copyright 2004-2005 University of Delaware

DE

Cognos Report Studio

>.

n the Insert Ta#le box, type < for the number of columns and ; for the number of rows. Clic( the box beside *aximiAe 'idth and clic( O(.

?. 6n the Inserta#le O#)ects Tool#ox tab, clic( the Text Item obHect and drag in into the top: left table cell. n the Text box that appears, type Sales ,erson and clic( O(. B. Repeat step ? for the top:middle bloc(. n the Text box that appears, type Order *ethod and clic( O(. 2. Repeat step ? for the top:right bloc(. n the Text box that appears, type Shipping Date and clic( O(. C. Clic( the bac(ground of any table cell to select it. 6n the ,roperties pane, clic( the Ancestor button and clic( Ta#le. D. n the Ta#le ,roperties pane, clic( 2oriAontal Alignment. -sing the pull:down arrow, select !enter to center the text in the table cells. Next, you will add a border to the table that includes "ertical lines between the cells. E. Clic( the bac(ground of the top:left table cell. CTRA:clic( the bac(grounds of all the other cells in the table. 83. n the Ta#le !ell ,roperties pane, double:clic( Border. Clic( all four borders on the diagram and set the borders to #lac% and solid line, set the width to 8px 1use the pull:down arrow under the Width box to select px5. Clic( O(. &ou will next add a bac(ground color to the top table row. 88. Clic( the bac(ground of any table cell in the top row to select it. 6n the ,roperties pane, clic( the Ancestor button and clic( Ta#le Ro": 84. .ouble:clic( Bac%ground !olor, clic( Sil.er, and clic( O(. 8>. Sa"e the in"oice report. n the next exercise, you will add data from the pac(age model to your in"oice report. Exercise *3(dd )ata to the Invoice 8. 6n the Inserta#le O#)ects *odel tab, expand the Sales reps item, clic( Sta44 name, and drag it into the bottom:left table cell. 1Note that since you set hori+ontal alignment on the table le"el, the Sta44 name text is automatically centered.5 4. 0xpand the Orders item, clic( Order method, and drag it into the bottom:middle table cell. >. 6n the Inserta#le O#)ects Tool#ox tab, clic( the Date obHect and drag it into the bottom: right table cell. ?. Sa"e the in"oice report. &our page body table should loo( li(e the one below%

Copyright 2004-2005 University of Delaware

E3

Cognos Report Studio

B. Run the report. #age down to see the in"oice numbers and staff names change. Notice that your table is nearly hiding the blue border line you added to your page header. To add more space abo"e the table% 2. Clic( the bac(ground of the page body. n the ,age Body ,roperties pane, clic( ,adding. Set the top padding to 89px and clic( O(. Now the in"oice header and page are better defined. Next you will add the product information for your in"oice. C. Clic( the bottom bloc( in the page body. n the Bloc% ,roperties pane, clic( ,adding. Set the top padding to ;9px 1use the pull:down arrow under the Width box to select px5 and clic( O(. D. 6n the Inserta#le O#)ects Tool#ox tab, clic( the ist obHect and drag it into the bottom bloc(. Note% &ou will associate the list with the )uery you ha"e already defined so that the data items you add to the list will become part of the tabular model for that )uery. 1'int% after you ha"e associated your list with the )uery and added the data in step 83 below, clic( on the Query 0xplorer tab and then clic( Query8 to see how the data is being handled for the whole report.5 Remember that all the data in your page is associated finally with the 6rder number dimension so that each time the 6rder number changes, Report Studio begins a new page that includes all the data for that 6rder number. E. n the !reate - ist box, clic( the radio button next to Existing +uery. -sing the pull:down button, select +uery8. -nchec( the box next to Auto populate. The box should loo( li(e the one below%

Clic( O(. 83. 6n the Inserta#le O#)ects *odel tab, expand the ,roducts item and, within ,roducts, expand the ,roduct !odes item. Clic( ,roduct num#er. 'old down the !TR (ey and, under ,roducts, clic( ,roduct name and Description. Continue to hold down the !TR
Copyright 2004-2005 University of Delaware

E8

Cognos Report Studio

(ey, expand the Orders item, and clic( $nit price and Re.enue. .rag the selections to the list frame you added. 88. Clic( one of the list column titles. 6n the ,roperties pane, clic( the Ancestor clic( ist !olumn Titles. button and

84. n the ist !olumn Titles ,roperties pane, double:clic( Bac%ground !olor. Clic( &ray and clic( O(. 8>. Clic( the Ancestor button and clic( ist. n the ist pane, double:clic( 0ont and set the SiAe to Ipt. Clic( O(. To ma(e the in"oice loo( li(e the sample one on page CB, you will combine the ,roduct name and Description in one column. 8?. 6n the Report Studio toolbar, clic( the $nloc% button.

8B. 6n the Inserta#le O#)ects Tool#ox tab, clic( the Bloc% obHect and drag it into the Description data item cell. When you see a small blin(ing line after DDescriptionE, release the mouse button. Repeat the process to add a second Bloc% obHect below the first. &our list should loo( li(e the one below%

82. Clic( the D,roduct nameE data item and drag it into the first bloc( you added. Then clic( the DDescriptionE data item and drag it into the second bloc(. The list should loo( li(e the one below%

8C. 6n the Report Studio toolbar, clic( the oc%

button. button.

8D. Clic( one of the blan( cells in the ,roduct name column and clic( the Delete

8E. Clic( the Re.enue column title. n the ist !olumn Title ,roperties pane, double:clic( Text and, in the Text box that appears, type ,rice. 43. Sa"e and run your in"oice report.
Copyright 2004-2005 University of Delaware

E4

Cognos Report Studio

End o Exercise

9or the final part of creating the n"oice, you will add the material for the bottom portion of the report. Exercise *4(dd a -ist 1ooter to the !eport 8. n the your initials In.oice report, clic( the title of the ,rice column and on the toolbar, clic( the Aggregate button*s down:arrow. Clic( Total. .oing this produces a list group footer 1Q6rder numberI5 and an o"erall footer 1Summary5. Note% The list group footer is 6rder number because that is the only dimension you ha"e defined for this report=there is no other data grouping. &ou can see this by clic(ing the Query 0xplorer tab and examining Query8. 4. 6n the toolbar, clic( the ist 2eaders B 0ooters button. n the ist 2eaders B 0ooters box, unchec( O.erall 0ooter to remo"e the o"erall footer from your report. Clic( O(. &our list should loo( li(e the one below%

Notice that the text for the cells with DOrder num#erE is light gray. >. Clic( the bac(ground of the one of the cells with the DOrder num#erE data item. ?. n the ist !ell ,roperties pane, under *iscellaneous, clic( !lass. -sing the pull:down arrow, select De4ault. This remo"es the gray color and ma(es the text the default blac(.

B. $a(e sure the DOrder num#erE cells are still selected. 9rom the Report Studio Structure menu, select Insert ist Ro" !ells Belo". n the Insert Ro"s Belo" box, type < for the number of rows. Clic( O(. &our list should loo( li(e the one below%

Copyright 2004-2005 University of Delaware

E>

Cognos Report Studio

2. Clic( to select the first cell below the DOrder num#erE cell. S' 9T:clic( to select the next cell in that row. &our list should loo( li(e the one below%

C. 9rom the Report Studio Structure menu, select *erge ist Ro" !ells. D. Repeat steps 2 and C for the next two rows of cells that you added to the list. E. Clic( the DOrder num#erE data item in the ist &roup 0ooter and clic( the Delete button. Note% The 6rder number data you need for this n"oice appears in the #age 'eader. &ou can delete the 6rder number from the list group footer and replace it with text 1if you choose5 to add information to the n"oice. 83. Select the cell from which you deleted DOrder num#erE and from the Report Studio Structure menu, select Split ist Ro" !ell. 88. n the same row, clic( to select the first cell and S' 9T:clic( to select the next cell. 9rom the Report Studio Structure menu, select *erge ist Ro" !ells. &our list should loo( li(e the one below%
Copyright 2004-2005 University of Delaware

E?

Cognos Report Studio

n the next steps, you will add text, styling, and alignment to produce an in"oice li(e the sample one on page CB. When you create your own reports, you will undoubtedly ma(e different choices for the items you add. 'ere you are exploring the process for ma(ing a report loo( the way you want it to. 84. 6n the Inserta#le O#)ects Tool#ox tab, clic( the Bloc% obHect and drag it to the merged cell you Hust created. 8>. 6n the Inserta#le O#)ects Tool#ox tab, clic( the Text Item obHect and drag it into the bloc(. n the Text box that appears, type Please Make Check Payable to University of Delaware. Clic( O(. 8?. Select the text you added and, in the Text Item ,roperties pane, double:clic( 0ont. Set the 'eight to Bold and clic( O(. 8B. 6n the Inserta#le O#)ects Tool#ox tab, clic( the Bloc% obHect and drag it to the remaining empty cell in the row you ha"e been wor(ing with. 82. 6n the Inserta#le O#)ects Tool#ox tab, clic( the Text Item obHect and drag it into the bloc(. n the Text box that appears, type Subtotal. Clic( O(. Repeat step 8? to ma(e Su#total bold. 8C. n the next row, clic( the first cell. 6n the Inserta#le O#)ects Tool#ox tab, clic( the Bloc% obHect and drag it to the selected cell. 8D. 6n the Inserta#le O#)ects Tool#ox tab, clic( the Text Item obHect and drag it into the bloc(. n the Text box that appears, type No Returns Without Receipt. Clic( O(. Repeat step 8? to ma(e the text bold. 8E. Repeat steps 8C and 8D to add the text Tax to the second cell in the row. Repeat step 8? to ma(e the text bold. 43. n the next row, repeat steps 8C and 8D to add the text Shipping to the second cell. Repeat step 8? to ma(e the text bold.

Copyright 2004-2005 University of Delaware

EB

Cognos Report Studio

48. n the last row, repeat steps 8C and 8D to add the text Total to the second cell. Repeat step 8? to ma(e the text bold. 44. Clic( the cell with the word Su#total then CTRA:clic( the cells with the words Tax, Shipping, and Total. 6n the ,roperties pane, clic( 2oriAontal Alignment and clic( Right. &our list should loo( li(e the one below%

Next, you will add a row at the bottom of the footer that will contain the text !lasses Begin August <8. 4>. Clic( the last cell of the last list row 1Hust after the cell with the word Total5. 9rom the Report Studio Structure menu, select Insert ist Ro" !ells Belo". n the Insert Ro"s Belo" box, type 8 for the number of rows. 4?. Clic( the first cell in the added row and S' 9T:clic( to select all the cells in the row. 9rom the Report Studio Structure menu, select *erge ist Ro" !ells. 4B. With the merged cell selected, clic( 2oriAontal Alignment in the ist !ell ,roperties pane. -sing the pull:down arrow, select !enter. Then clic( 0ont and set the 'eight to Bold. 42. 6n the Inserta#le O#)ects Tool#ox pane, clic( the Bloc% obHect and drag it to the bottom row. 4C. 6n the Inserta#le O#)ects Tool#ox tab, clic( the Text Item obHect and drag it into the bloc(. n the Text box that appears, type Classes Begin August 31. Clic( O(. The text ta(es on the styling you applied at the list cell le"el. Next you will add calculations to pro"ide data for the Tax, Shipping, and Total items you added earlier. 4D. 6n the Inserta#le O#)ects Tool#ox pane, clic( the !alculation obHect and drag it to the cell to the right of Tax. n the !reate !alculation box, for the Name type Tax then clic( the &roup icon and clic( O(%

Copyright 2004-2005 University of Delaware

E2

Cognos Report Studio

This opens a !u#e Data Item window li(e the one below%

4E. n the Expression De4inition pane, type


[Revenue] * .06

Clic( the /alidate

button then clic( O(.

>3. Clic( the Tax calculation DTaxE you Hust added and in the Text Item ,roperties pane under !u#e Data Item, clic( Aggregate 0unction. -sing the pull:down arrow, clic( Aggregate. Then, under Data, double:clic( Data 0ormat. -sing the pull:down arrow for the 0ormat type box, select !urrency. 9rom the resulting ,roperties list, select !urrency Sym#ol and clic( O(. >8. 6n the Inserta#le O#)ects Tool#ox pane, clic( the !alculation obHect and drag it to the cell to the right of Shipping. n the !reate !alculation box, for the Name type Shipping then clic( the &roup icon and clic( O(. >4. n the Expression De4inition pane, type
[Revenue] * .01

Copyright 2004-2005 University of Delaware

EC

Cognos Report Studio

Clic( the /alidate

button then clic( O(.

>>. Clic( the Shipping calculation DShippingE you Hust added and, in the Text Item ,roperties pane under !u#e Data Item, clic( Aggregate 0unction and, using the pull:down arrow, clic( Aggregate. Then, under Data, double:clic( Data 0ormat. -sing the pull:down arrow for the 0ormat type box, select !urrency. 9rom the resulting ,roperties list, select !urrency Sym#ol and clic( O(. >?. 6n the Inserta#le O#)ects Tool#ox pane, clic( the !alculation obHect and drag it to the cell to the right of Total. n the !reate !alculation box, for the Name type Total then clic( the &roup icon and clic( O(. >B. n the Expression De4inition pane, type
[Revenue] + [Tax] + [Shipping]

Clic( the /alidate

button then clic( O(.

>2. Clic( the Total calculation DTotalE you Hust added and, in the Text Item ,roperties pane under !u#e Data Item, clic( Aggregate 0unction and, using the pull:down arrow, clic( Aggregate. Then, under Data, double:clic( Data 0ormat. -sing the pull:down arrow for the 0ormat type box, select !urrency. 9rom the resulting ,roperties list, select !urrency Sym#ol and clic( O(. >C. Clic( the bac(ground of the Tax calculation cell then CTRA:clic( the bac(ground of the Shipping and Total calculation cells. n the ist !ell ,roperties pane, clic( 2oriAontal Alignment and, using the pull:down arrow, clic( Right. &our list should loo( li(e the one below%

>D. Sa"e and run the in"oice report. Lust a few border lines and the n"oice will be complete. >E. Clic( any cell or bloc( in your report. 6n the ,roperties pane, clic( the Ancestor and clic( ,age. button

?3. n the ,age ,roperties pane, double:clic( Border. Set the !olor to Blue, the Style to Solid ine and the 'idth to 8pt. Clic( all four borders on the diagram and clic( O(.
Copyright 2004-2005 University of Delaware

ED

Cognos Report Studio

?8. Clic( the cell with the text ,lease *a%e !hec% ,aya#le to $ni.ersity o4 Dela"are. 6n the ,roperties pane, clic( the Ancestor button and clic( ist Ro" !ells: ?4. n the ist Ro" !ells ,roperties pane, double:clic( Border. Set the !olor to Blac%, the Style to Solid ine and the 'idth to 8:=pt. 10ither type 8.B in the Width box or select 8R from the list.5 Clic( the bottom border on the diagram and clic( O(. ?>. Sa"e and run the in"oice report. &our report should loo( li(e the sample one on page CB. f you page down, you will see that a new in"oice begins on each new page.
End o Exercise

Create a Temp&ate
&ou can create a report template to be used for reports specific to your department. To do this, start with a blan( report and add the components you want e"ery report to ha"e but do not add data from the model to the report. Sa"e the report. When you want to use the template, open it, select Sa"e !s from the 9ile menu, and name the new report. n the next exercise, you will create a report template. When you finish, your template will loo( li(e the one below%

Copyright 2004-2005 University of Delaware

EE

Cognos Report Studio

Exercise +5Create a !eport Temp&ate 8. 6n the Report Studio toolbar, clic( the Ne" 4. n the Ne" box, select Blan% and clic( O(. button. Clic( the boxes button to create a new report.

>. 6n the Report Studio menu, clic( the ,age 2eader B 0ooter next to 2eader and 0ooter and clic( O(.

?. Clic( inside the ,age 2eader area and in the ,roperties pane, double:clic( Border. Set the !olor to Blue, the Style to Solid ine and the 'idth to ;px 1use the pull:down arrow under the Width box to select px5. Clic( the bottom border and clic( O(. B. 6n the Inserta#le O#)ects Tool#ox tab, clic( the Ta#le item and drag it into the ,age 2eader area. n the Insert Ta#le box, type ; for the Num#er o4 columns and ; for the Num#er o4 ro"s. $a(e sure the *aximiAe "idth box is chec(ed. 2. 6n the Inserta#le O#)ects Tool#ox tab, clic( the Text Item and drag it into the top:left table cell. n the Text box, type Double-click to add text. Clic( O(. C. 'ighlight the text you Hust added and in the Text Item ,roperties pane, double:clic( 0ont. Set the 0amily to Arial, the SiAe to 8Jpt and the 'eight to Bold. Clic( O(. D. 6n the Inserta#le O#)ects Tool#ox tab, clic( the Date item and drag it into the bottom left table cell. E. 'ighlight the Date item and in the Text Item ,roperties pane, double:clic( 0ont. Set the 0amily to Arial and the SiAe to 8;pt. Clic( O(. 83. 6n the Inserta#le O#)ects Tool#ox tab, clic( the Image item and drag it into the top:right table cell. 88. Clic( the Image item you Hust added and on the Image ,roperties pane, double:clic( $R . Set the Image $R to ::KsamplesKimagesKlogo:)pg and clic( O(. 84. Clic( the bac(ground of the top:right table cell and in the Ta#le !ell ,roperties pane, clic( 2oriAontal Alignment. -sing the pull:down arrow, select Right for the alignment. 8>. 6n the Inserta#le O#)ects Tool#ox tab, clic( the Text Item and drag it into the bottom:right table cell. n the Text box, type Double-click to add Department name. Clic( O(. 8?. 'ighlight the text you Hust added and in the Text Item ,roperties pane, double:clic( 0ont. Set the 0amily to Arial, the SiAe to 8;pt and the 'eight to Bold. Clic( O(. Next, double: clic( 0oreground !olor and clic( Blue. Clic( O(. 8B. Clic( the bac(ground of the bottom:right table cell and in the Ta#le !ell ,roperties pane, clic( 2oriAontal Alignment. -sing the pull:down arrow, select Right for the alignment. This completes the ,age 2eader. Next, you will add a list frame to the ,age Body.

Copyright 2004-2005 University of Delaware

833

Cognos Report Studio

82. 6n the Inserta#le O#)ects Tool#ox tab, clic( the ist item and drag it into the page body. &ou will see a !reate F ist box li(e the one below%

8C. n the Based on area, ma(e sure Ne" -uery is selected. Clic( O(. Next, you will create the ,age 0ooter. 8D. Clic( inside the ,age 0ooter area and in the ,roperties pane, double:clic( Border. Set the !olor to Blue, the Style to Solid ine and the 'idth to ;px 1use the pull:down arrow under the Width box to select px5. Clic( the top border and clic( O(. 8E. 6n the Inserta#le O#)ects Tool#ox tab, clic( the Ta#le item and drag it into the ,age 0ooter area. n the Insert Ta#le box, type ; for the Num#er o4 columns and ; for the Num#er o4 ro"s. $a(e sure the *aximiAe "idth box is chec(ed. 43. 6n the Inserta#le O#)ects Tool#ox tab, clic( the Text Item and drag it into the top:left table cell. n the Text box, type University of Delaware. Clic( O(. 48. 'ighlight the text you Hust added and in the Text Item ,roperties pane, double:clic( 0ont. Set the 0amily to Arial, the SiAe to 8Jpt and the 'eight to Bold. Clic( O(. 44. 6n the Inserta#le O#)ects Tool#ox tab, clic( the Text Item and drag it into the top:right table cell. n the Text box, type Newark, DE 19716. Clic( O(. 4>. 'ighlight the text you Hust added and in the Text Item ,roperties pane, double:clic( 0ont. Set the 0amily to Arial and the SiAe to 8Jpt. 4?. Clic( the bac(ground of the top:right table cell and in the Ta#le !ell ,roperties pane, clic( 2oriAontal Alignment. -sing the pull:down arrow, select Right for the alignment. 4B. Clic( the bottom:left table cell then S' 9T:clic( the bottom right table cell. 9rom the Report Studio Ta#le menu, select *erge !ells. 42. 6n the Inserta#le O#)ects Tool#ox tab, clic( the ,age Num#er item and drag it into the bottom table cell. 4C. 'ighlight the ,age Num#er item and in the Text Item ,roperties pane, double:clic( 0ont. Set the 0amily to Arial and the SiAe to 89pt. Clic( O(.

Copyright 2004-2005 University of Delaware

838

Cognos Report Studio

4D. Clic( the bac(ground of the bottom table cell and in the Ta#le !ell ,roperties pane, clic( 2oriAontal Alignment. -sing the pull:down arrow, select !enter for the alignment. 4E. Clic( the bac(ground of any area in your report template. 6n the ,roperties pane, clic( the Ancestor button and clic( ,age. >3. n the ,age ,roperties pane, double:clic( Border. Set !olor to Blue, Style to Solid ine and 'eight to 8px. Clic( all ? borders on the diagram and clic( O(. >8. 6n the Report Studio window 0ile menu, clic( Sa.e As. >4. n the Sa"e !s Name box, type your initials Template. Clic( Sa.e.
End o Exercise

&ou ha"e now created a template that can be used to create other reports. When you want to use the template, open it and choose Sa.e As from the Report Studio 0ile menu. 7i"e the report a new name to preser"e the template.

Copyright 2004-2005 University of Delaware

834

You might also like