Home >Documents >Cognos Query Studio

Cognos Query Studio

Date post:16-Nov-2015
Category:
View:2 times
Download:0 times
Share this document with a friend
Description:
Query Studio--Cognos
Transcript:
Day 1 Query Studio:
Query Studio is the reporting tool for creating simple queries and reports in Cognos 8, the Web-based reporting solution.
Use Query Studio to:
create ad hoc reports that can be viewed by others
customize ad hoc reports that have been saved
compare and analyze data
*
Title could also be “Query Studio: Overview,” but what we’ve got there is more “task-based,” I suppose.
Query Studio differs from Report Studio in that it is designed for ad hoc reports that can be created “on the fly.” To me, Report Studio is more like Impromptu, where you can create very elaborate managed reports with more calculation/formatting options.
Other things that RS has that QS doesn’t:
support for MULTIPLE QUERIES in the same report (i.e., you can pull data from multiple data sources in one report… note that you couldn’t do this in Impromptu)… this seems to be the biggest difference
multiple page layouts
complete ability to create free-form layouts through the use of HTML-like layout objects
drill through capabilities from parent->child reports
conditional formatting
support for browser-based interpreted languages (JavaScript, HTML) and technologies (ActiveX)
advanced prompting (more powerful than PowerPrompts)… seems to be a big part of their marketing “spin…” you can create very thorough prompts without lots of code
What, then, can QS do that makes it “special?” (see p. 9 of the QS User Guide (draft))
1) explore datayou can connect to one data source at a time and view the contents of that data source in a tree hierarchy. If you want to see the columns of a table, you can expand the table in the tree and view the type of data each column contains, and so forth (easier than going into SQL*Plus or some other tool and running a DESCRIBE command)
2) create reportsmost of the reports that you’re going to create from the data source are going to be very simple and likely aren’t intended for wide distribution (I’m guessing that you’d use Report Studio to do really “nice” looking reports for mass distribution; for example, over a corporate LAN, etc.). Once the reports are created, you can save and reuse them. You can also take an existing report, modify it, and then re-save it under a different name (saves time/effort, like doing the same thing with a .doc file in Word)
3) change the appearance of reportsalthough the reports are ad hoc, you can make them look “pretty” or otherwise increase their visual impact (for example, by adding a chart or a title, or re-ordering columns)
4) work with data in a reportthe most basic report in QS just has rows and columns (like a simple list report in Impromptu or a foundation query in Cognos Query)… however, you can filter and summarize data, or add other calculations to make the report more useful for analysis (e.g., you don’t want the user to try figuring out the “profit” figure on their own using the existing columns; give them a calculated column with this information)
To use QS effectively, you should know how to browse the Web, and you should know your organization’s business and its data. You may also need to be familiar with the other parts of ReportNet (I think Framework Manager knowledge would be useful here).
© Satyam 2009
To access Query Studio, the navigation is as follows.
1) In Web browser, type the URL http://servername/cognos8. You will get the WELCOME page
2) In the WELCOME page, hyperlinks are available for Cognos Connection, Query Studio, Analysis Studio, etc. Click on Query Studio hyperlink
3) You will be prompted to choose a package to work with. Choose the package you want to work with to generate adhoc reports.
© Satyam 2009
*
You can open Query Studio itself, or open an existing report that was created in Query Studio.
If you click either Query Studio link on the front page of Cognos Connection, Query Studio will open with a blank layout. The left pane shows the package that was published from Framework Manager. You add data items from the package to the right side either by dragging and dropping or clicking the Insert button.
When you open Cognos Connection, you may be prompted to log on (see the Admin and Security Guide for more info re: this). Note that Cognos Connection is the single point of access for all ReportNet content.
The QS User Guide recommends creating a bookmark in your browser for quick access to the portal.
© Satyam 2009
Create an Ad Hoc Report
*
When you CREATE a report, what you’re really doing is creating a QUERY SPECIFICATION that defines what CRITERIA are used to retrieve data. Basically you’re writing an SQL SELECT statement. The RESULT SET of this query specification is what we call a “report.”
Before creating a report in QS, ask the following questions:
What BUSINESS QUESTION do you want to answer? For example, you may want to know “which sales representative sold the most products.”
Which TYPE of report best answers the report. A crosstab? A simple list? A chart?
Who is the TARGET AUDIENCE?
What DATA ITEMS and CALCULATIONS do you need to answer the business question?
Overall, to create a new report, you must:
1) Create the report
3) Save the report
4) Run the report to pull the data from the data source and look at it
Once you’ve run the report, you may want to work with the data you see (for example, by adding a profit calculation), or change the layout.
You can also create a new report by modifying an existing report and saving the new version using another name.
In this example, only one package has been published from the model created in Framework Manager. If you have more than one package available as a data source, click the Public Folders tab, and then click the package that you want to use as a data source.
Then click the Query Studio link on the toolbar. This opens QS with the a tree hierarchy of the selected package in the left pane (in this case, the published package is called “GO Sales and Retailers”).
At this point, you can explore each of the query items in the package. For example, you may want to see what’s in the Products query item. Does it include product price?
To exit QS and return to Cognos Connection, click Return or the Cognos Connection link at the top.
© Satyam 2009
You can open an existing report to:
view the most current data in the report
make changes to the report
use it as the basis of a new report
Open the report in Query Studio by clicking the report link or the Edit with Query Studio icon.
*
Note that, in QS, reports always use the MOST RECENT version of the package that has been published. If the package has been republished, you are notified that the report will use the NEWEST VERSION of the package. You must then save the report to complete this update.
In the slide example, we’re looking at the existing Low Revenue Products report that was created in QS. This report was saved to the Public Folders, so to access it:
1) In Cognos Connection, click the Public Folders link.
2) Click the package that was used to create this report (in this case, GO Sales and Marketing). This will show all the reports that were created using this package.
3) Locate the name of the report that you want to open, and then click the link or the Edit icon. Either one will open the report in Query Studio view so that you can edit it (e.g., by filtering data or creating calculations).
If you want to just RUN the report without editing it, click the Run with options button. This opens a new screen where you can Select how you want to run and receive your report. For example, you may want to look at it in PDF or CSV format (the default is HTML). Then it runs the report in Report Viewer.
In Edit mode, you can tweak the report as necessary. If you want to keep the “tweaks” and the original report, then save the modified report using a different name.
To browse through the PAGES of a report, use the links at the bottom of the page.
If a report contains more columns than you can see, use the scroll bar to move left or right.
To increase the available space for viewing reports, click the hide menu button in the top right corner.
To view the menu again, click the show menu button in top left corner of the report.
Note that in this example, when we clicked on the link or the Edit button, the report pulled in the latest data. We can use this to decide if we need more tweaks to see what we want (for example, calculations).
In Report Viewer, if you open a saved report after the package it is based on is REPUBLISHED, one of 2 things happens:
If the ORIGINAL version of the package still exists, the report runs against the original version of the package.
If the original version of the package NO LONGER exists, the report is updated to run against the most recent version.
If a new version of the package has been published when you open the report in EDIT mode, you’ll be prompted to run it against this new version. Then save the package to avoid being prompted again.
© Satyam 2009
Add Data to Ad Hoc Reports:
You can add data to an empty report by choosing the report items from the package.
*
May want to combine this with the “Create an Ad Hoc Report” slide… Basically beating a dead horse here.
As noted earlier, a NEW report created in QS doesn’t have any data in it. You CHOOSE the REPORT ITEMS that you want to include in the report from the PACKAGE that has been created from the MODEL created in Framework Manager.
Packages can include:
query items, such as columns of measures and non-measures
query items CREATED by the data modeler, such as calculated query items
Items that you add from the package to the report are called REPORT ITEMS. In Architect, the stuff in the package was called “subjects” and “subject items.”
The report items that you add from the package to your report appear as rows and columns in TABULAR reports, such as list reports and crosstab reports.
In CHARTS, report items appear as data markers and axis labels.
You can also add CALCULATIONS in QS that don’t exist in the package itself. This is basically the same as what you could do in Cognos Query.
To insert data into an existing report:
1) Open the report in QS.
2) In the menu on the left side, click the Insert Menu command. This opens a tree hierarchy of the selected package (I.e., shows the query subjects and query items within each query subject).
3) In the left pane, double-click each query item that you want to add to the report, or click the item and then click the Insert Data button.
By default, each new report item follows the last report item, but you can insert an item in a different position.
You can insert a data item in a different position. Just click an existing heading in your report, then add a new query item. The item that you add will PRECEDE this heading.
To simultaneously add several query items, Ctrl+click to select multiple items, then click the Insert Data button.
To REMOVE data PERMANENTLY from the report, click the report heading, then click the delete button on the toolbar. When you save the report, this change will persist.
In the slide example, we’re looking at a report that contains data from two query subjects: Order and Product. I’ve highlighted two columns that are sourced from two query items within the Product query subject: Product type and Product name.
© Satyam 2009
Save your reports to preserve any changes.
*
Once a report is developed, you can do 2 things
You can save the changes with the same name for the report (for already existing reports)
You can use “Save AS” option to save the changes as a new report (for already existing reports)
You can save a new report
During saving, you have the choice to choose the location where you would like to save the report.
© Satyam 2009
View Data in Ad Hoc Reports:
You can open a report in Report Viewer to look at the most recent data from the data source.
You can also look at the most recent data while you are editing the report in Query Studio.
HTML Report in English
PDF Report in German
*
Basically, the distinction is between viewing the reports in edit mode (where you can add/remove columns, do formatting, etc.), and looking at them in Report Viewer. Report Viewer lets you view the reports in three different formats (HTML [the default], CSV, PDF), while viewing the data in edit mode is one standard.
You can also choose which language you want to view the report in.
© Satyam 2009
Print your report to obtain a paper copy.
*
In this slide, we’re indicating how you can print directly from the browser. Even the documentation indicates that this isn’t the ideal, but it’s easy to do at any point.
However, you can also print the report by running the report and specifying that you want to print the report in PDF format.
To do this, you must add a printer in Cognos Connection (easiest way to do this is to click Directory, then click the Printers tab and specify a network address).
We also cover printing when we cover distribution. Printing is a distribution method and can also be SCHEDULED. The advantages are pretty obvious.
© Satyam 2009
Understand Report Types:
Use different report types to look at data in different ways or to answer different business questions.
List Report
This slide shows 3 different types of reports
List Report – This type has a row heading of different query items and values are listed against these columns
Grouped List Report – This type is similar to list report with one difference. Repeating query item values are grouped and printed only once for each value
Crosstab Report – In this type, one measure is printed at the cross section of each row and column. Each column has a query item and each row has a query item.
© Satyam 2009
Create a chart to present information graphically.
A report requires at least one measure and non-measure to produce a chart.
Pie Chart (100% Stacked)
*
This slide shows an example of a type of report called “Chart” report. This report can be used to visually represent the distribution of a measure for each value of a non-measure.
© Satyam 2009
*
This slide marks the beginning of the section dealing with creating reports using Query Studio
© Satyam 2009
Display Data With List Report:
Create a list report to show information in a list, such as products or customers.
A list report shows data in rows and columns.
*
This slide shows the list report. To create a list report, the following steps needs to be done
Create a blank report by clicking “New Report” icon.
Click “Insert Data” in the menu on the left hand side. This will display the contents of the package on the left hand side.
Drag and drop (or double click) the query items needed in the report in the blank template.
© Satyam 2009
Group a list report to suppress duplicate values.
You can organize the grouped data by row headings or section headings.
Data Grouped by Row Headings
Data Grouped by Section Headings
*
This slide shows the Grouped List Report. For developing this report, one needs to do the steps outlined in previous slide and then the following
For “Data Grouped by Row Headings”
Highlight the column which needs to be grouped and click “Group” icon in the toolbar.
For “Data Grouped by Section Headings”
1) Highlist the column which needs to be grouped and click “Create Sections” icon in the toolbar.
© Satyam 2009
Expand and Collapse Data Groups:
You can expand or collapse grouped data in a report to show more or less detail.
Fully expanded grouped report
*
This slide shows how to collapse groups for a 3 level report
1) Highlight the column to be collapsed and click “Collapse Group” icon in the toolbar. By repeating this step again and again, 3 levels can be collapsed as shown in the slide.
© Satyam 2009
Create a crosstab report to present data more clearly.
You create a crosstab report by rotating the values in a list report to produce column headers.
A crosstab report shows a summary value at the intersection of each row and column.
List Report Before Pivoting
*
This slide shows how to create a crosstab report from a list report
1) Hightlight one column (country in the slide) and click “pivot” icon in the toolbar. You will get the crosstab report as shown in the slide.
© Satyam 2009
Swap rows and columns
You can interchange rows and columns in a crosstab, a chart based on a crosstab, or both. For example, if you have a crosstab report that has few rows and many columns, you can swap the rows and columns to make the report easier to read.
If you have multiple rows or columns in a crosstab report, the outermost rows become the outermost columns, and the outermost columns become the outermost rows.
Crosstab Report Before Swapping
Crosstab Report after Swapping
*
This slide shows how to swap rows and columns for a cross tab report. Sometimes, we may have a cross tab report with few rows and many columns. In order to improve the readeability of the report, we might want to swap rows and columns as given below
1) Click on “swap rows and columns” icon in the toolbar. This will switch the rows and columns of the cross tab report.
© Satyam 2009
Sort Data in Ad Hoc Reports:
You can sort your data in either ascending or descending alphabetical or numeric order.
*
This slide shows how to sort data in your report.
Highlight the column to be sorted in the report.
Click on “Edit data” in the menu on the left side
Click on “Sort” from the resulting pull down menu. You will get a popup as shown in the slide
Choose one radio button and press ok. Based on your selection, report will be sorted.
© Satyam 2009
Create a chart to present information graphically.
*
This slide shows how to covert a list report into a chart report
Create a list report as shown in the slide
Click on “Chart” icon in the tool bar. Choose from the options presented to you.
© Satyam 2009
Specify a Chart Type:
Consider what you want the chart to illustrate before you choose a chart type.
Use a pie chart to highlight proportions rather than actual values.
Use a column chart to show how data changes over time.
*
This slide shows different chart types like pie chart, column chart & bar chart.
Pie chart – This is used to highlight proportions rather than actual values
Column chart – This is used to show how data changes over time
Bar chart – This is used to place less emphasis on time and focus on comparing…

Click here to load reader

Reader Image
Embed Size (px)
Recommended