RegisterLog In to Jazz.net dW

Building a Report in Rational Common Reporting

This document contains two sections. The first is a quick overview about creating reports against live RQM data and some tips to remember. The second is a detailed list of all the steps to create a report.

Overview

When creating a report, you can start with a predefined template. The template used in this example is called the RI Report Template and can be found in Public Folders\Sample Report Definitions\Framework Manager Data Models. First, you add a list control to the report. Then, you add the fields to the list control that you want to report on. This creates a query automatically. The query is named Query 1 by default. Use best practices by changing the name to something more meaningful.

Important: When using Live Data, the project from which the data is coming MUST be specified. Therefore, when you add fields to the list control a parameter called ?Project? will automatically be added for you. You need to add a prompt for this parameter. (See steps 4-11 in the Add a Field to the List Control for Reporting section.)

You will then perform the following steps:

  • Add a Project prompt and associate it with the project parameter (See steps 4-11 in the Add a Field to the List Control for Reporting section.)
  • Create the prompt page and copy the prompt to that page.
  • Add a Test Plan filter to the report query. This creates a new parameter for which I create another prompt. This prompt MUST cascade off of the project prompt. (See steps in the Add a Prompt for the Test Plan section.)
  • Add the necessary buttons (Reprompt, Finish) to the report.
Notes:
  • There are many different ways to create these reports. This example is not the only way to create a report, and you might find a better way of creating reports.
  • When creating a report against Live Rational Quality Manager data note a few things:
    • Create a Project prompt and associate it with the Project parameter that gets created for you automatically when you add a field to the report.
    • If you create additional parameters based on fields other than Project, create prompts for them and have those prompts cascade off of the Project prompt.
    • Make sure that the prompts you create are in both the Report page and the Prompt Page.

Detailed Report Creation Steps

Open a Sample Report Template

  1. Connect to Rational Common Reporting using the browser (for example, http://server:port/insight).
  2. From the upper, right corner, click Launch > Report Studio.

    launch report studio

  3. When prompted to select a package, click Reporting Data Model (IBM Rational Quality Manager).

    select a package

  4. Click Create a new report or template.

    create a new report

  5. Click Existing? and then click OK.

    click existing

    After you have many reports, you can choose to select a real existing report to start with. In this example, use a sample report template that you should also have available to you.

  6. In the dialog that displays, browse to Public Folders\Sample Report Definitions\Data Warehouse Reports, click the RI Report Template, and then click Open.

    open

    This gives you a reasonable start to your report.

    report title

Create the Queries

  1. In the Insertable Objects window at the left, click the Toolbox (toolbox) tab. Drag the List control into the report. Drop it just to the left of the About This Report control. This list displays your report data.

    insertable objects

    By adding this List control, a query called Query 1, was automatically created for you. While it is not required, follow best practices by renaming the query to a meaningful name, such as Report Query. Because other queries are created for prompts, using descriptive names makes it easier to identify each query.

  2. Hover over the Query Explorer (Query Explorer) tab to expand the list of queries, and click Query 1.

    Query Explorer

  3. In the Properties window, scroll to the bottom, and update the Name field to Report Query.

    Properties window

Add a Field to the List Control for Reporting

  1. Hover over the Page Explorer (Page Explorer) tab to expand the list of pages, and select Page 1.

    Page Explorer tab

  2. In the Insertable Objects window, click the Source (Source) tab of the Insertable Objects area. Scroll down and expand the Test Plan Area. Expand the Test Plan table, and drag the Title field to the first column in the List control.

    Insertable Objects window showing test plan

    After dropping the Test Plan Title onto the List control, your report will look like this:

    Title field

  3. Click on the Title column. Since Title is too generic for a name, go to the Properties window, and change the Name property to Test Plan Name.

    Because this is a live report, a Project Parameter will automatically be added to the report. You need to provide a prompt for this parameter. This will provide the best user experience and also ensures that the report behaves correctly when it is run in Rational Quality Manager.

  4. Click the Parameter Name text item in the Parameters section of the page, and change the text to Project Name, since we will be adding a Prompt for the project.
  5. Click the Parameter Value text item in the Parameters section, and delete it.
  6. In the Insertable Objects window, click the Toolbox (Toolbox) tab. Drag the Value Prompt control into the report and drop it where the Parameter Value text control used to be.

    Value Prompt

    This opens the Prompt wizard.

  7. Select Use existing parameter. In the drop-down list, select the Project parameter, and then click Next.

    Choose parameter in prompt wizard

  8. Type Project Query in the name field.
  9. Click the ellipses (?) button next to the Values to use field. In the Choose Package Item dialog, expand Project, and then click the Name field. Click OK.

    Choose package in prompt wizard

  10. Do the same for the Values to Display field.

    The Prompt wizard should look like this:

    Prompt wizard--populated control

  11. Click Finish.

    The Queries Explorer now displays two queries, Report Query and Project Query.

  12. Click the prompt that you just added. If you want to change the display of the prompt from a list box to a radio button group, you can change the setting in the Select UI property.

    select UI field

Create the Prompt Page

If you run the report now, the project prompt will not have a selection list. The reason for this is that you have not defined a prompt page.

Create the prompt page:

  1. In the Page Explorer (Page Explorer), click Prompt Pages. In the Insertable Objects window, double-click the Page entry to create Prompt Page 1.

    prompt page

  2. Double-click Prompt Page 1 to open the prompt page.

    You can copy the prompts and labels from Page 1 to Prompt Page 1.

  3. Use the Page Explorer (Page Explorer) to open Page 1. Right-click the Parameters label object (not just the text but the entire object), and click Copy.
  4. Use the Page Explorer (Page Explorer) to open Prompt Page 1 again. Right-click in the page, and click Paste.
  5. Use the Page Explorer (Page Explorer) to open Page 1 again. This time click in the area to the right of the project prompt field. This selects the entire row, including the Project Name label and the Project prompt.

    select label in parameters section

  6. Use the Page Explorer (Page Explorer) to open Page 1 again. Right-click on the page, and click Paste.

    Your prompt page should look like the following:

    Prompt page parameters

    If you run the report now you will see that the project-selector prompt appears on the first page that comes up.

    Prompt page view

Add More Fields to the Report List

  1. Switch back to Page1 via the Page Explorer (Page Explorer). In the Insertable Objects window, click the Source (Source tab) tab, expand Test Plan Area, and then expand Test Plan Related Test Cases.
  2. Drag the Title field to the List control. Do the same for State and Owner.

    owner, state, and title fields

    You can additional fields for your report. You can also update the properties of the fields. In this example, Title is updated to Test Case Name.

    The report page now looks like the following:

    queries

Add a Prompt for the Test Plan

Adding a prompt for the test plan allows the user to choose the plans to report against.

  1. Using the Query Explorer (Query Explorer), open Report Query. Drag Test Plan Name from the Data Items section to the Detail Filter section
  2. In the Detail Filter Expression dialog, type in ?TestPlan? to the Expression definition, so that the whole expression is now ?[Test Plan Name] in ?TestPlan?? Click OK.
  3. Click on the expression in the Detail Filter section, so that its properties are shown in the Properties window. In the Usage field, select Optional.

    Detail filters for Usage field

    This created a new parameter called TestPlan that you need to create a prompt for. There are many ways you could add another Prompt label and Prompt to the parameter section. Here is an example:

    1. Use the Page Explorer (Page Explorer) to return to Page 1.
    2. Right-click to the right of the Project Prompt, and click Copy. Right-click again in the same place, and click Paste.

      Your page will look like the following:

      Parameters for project name

    3. Click the lower Project Name label, and change it to Test Plan.
    4. Click the lower Project Prompt to select it. Right-click the lower Project Prompt, and select Delete.
    5. Next, you replace the Project Prompt with a Test Plan prompt. In the Insertable Objects window, click the Toolbox (Page Explorer) tab. Drag the Value Prompt, and drop it where you just removed the Project Prompt.

      Value Prompt

    6. In the Prompt wizard, select Use existing parameter. Select the TestPlan parameter, and click Next.

      Choose Parameter

    7. On the next page, type Test Plan Query in the Name field. Leave the default in the Values to use field as is and set the Cascading Source to be Project. Click Finish.
    8. Click the Prompt that you just created, so you can set the properties for it. In the Select UI property, select Check Box Group.

      Check box group

Copy the New Parameter to the Prompt Page

  1. Right-click to the right of the new Test Plan prompt, and click Copy.
  2. Click the Prompt Page 1. Right-click to the right of the Project prompt, and click Paste.

    Your prompt page should look like the following:

    Project Name and Test Plan Parameters

    Because the Test Plan prompt cascades off of the Project prompt, you need to add a Reprompt button. The user will click this button after selecting a Project in order to populate the Test Plan prompt. You will also want a Finish button in case the user does not care to select a Test plan.

  3. In the Insertable Objects window, click the Toolbox (Page Explorer) tab. Drag the Prompt Button, and drop it on your form twice. You can put the buttons anywhere. In this example, the buttons are dropped after the Parameters label.
  4. Click the first button. In the Type property, select Reprompt.
  5. Click the second button. In the Type property, select Finish.

    Your prompt page should look like this:

    Type field

Add the Reprompt and Finish Buttons to the Report Page

  1. Use the Page Explorer (Page Explorer) to return to Page 1.
  2. In the Insertable Objects window, click the Toolbox (Toolbox) tab. Drag the Prompt Button, and drop it on your form twice. You can put the buttons anywhere. In this example, the buttons are dropped after the Parameters label.
  3. Click the first button. In the Type property, select Reprompt.
  4. Click the second button. In the Type property, select Finish.

    Your page should look like this:

    Remprompt and Finish buttons

Group the Report by Test Plan

This makes the report look a little nicer when it runs and prevents the Test Plan value from displaying in every row of the report.

  1. Click in the Test Plan Name column in the list control, and then click the Group/Ungroup (Group/Ungroup) icon to group by Test Plan.

    Toolbar

    Your report should now look like this:

    Finished report

  2. The last steps are to update the labels in the report, such as the Report Title, Chart Title, and Report Description. Click on them to update the text.

    Your report is now ready to go.

About the author

Mark Victory is an Advisory SW Engineer for IBM. He has many years of experience in the software quality space, including work on Rational Test Manager, Rational Manual Tester, and most recently Rational Quality Manager. Mark works in Littleton, Massachusetts. When he's not working, Mark can usually be found watching his son and daughter play baseball, softball, or basketball. He can be contacted at MVictory@us.ibm.com.

Feedback
Was this information helpful? Yes No 1 person rated this as helpful.