Rational ClearQuest FAQs: Working with reports and queries

You can use IBM Rational ClearQuest to analyze project progress by running queries, charts, and reports. If you have a question about some aspect of working with reports and queries, you may find it answered here.

Rational staff (rust@us.ibm.com), Staff, IBM, Software Group

This article is brought to you by the Rational staff at developerWorks.



20 November 2003

Last updated: 10 August 2006

IBM® Rational® ClearQuest® can analyze project progress by running queries, charts, and reports. The following is a collection of frequently asked questions about working with reports and queries that were compiled from the Rational ClearQuest support site on ibm.com. If appropriate, the technote for the related question is cited in brackets after each answer.

You may also want to refer to the Introducing Rational ClearQuest user guide and to the ClearQuest online help. Online help is divided into topics, which are grouped into books. You can print a topic or an entire book. To print a specific topic, right-click in the topic and choose Print or Print Topic from the shortcut menu. To print all the topics in a book, choose a book in the Contents tab in the Help Topics window and then click Print.

You can join the Rational ClearQuest forum on developerWorks if you want to post questions and communicate with other ClearQuest users.

Section 1. Working with Reports

Section 2. Working with Queries

Section 1. Working with Reports

  1. Do I need to have Crystal Reports installed on my machine in order to run reports?
  2. How do I create a report?
  3. How do I create a new report format in Crystal Reports that includes multiline string fields?
  4. How do I prevent multiline string fields from overwriting other fields in Crystal Reports?
  5. How do I add a new field to my report?
  6. How do I group reports by a specific field?
  7. How do I make landscape reports?
  8. How do I export ClearQuest reports to other applications?

1.1. Do I need to have Crystal Reports installed on my machine in order to run reports?

No. The components required for viewing existing reports (Seagate Crystal Reports runtime components) are installed with ClearQuest. Only users who need the ability to author reports need to install additional software.

1.2. How do I create a report?

A report is made up of:

  • a query that returns a recordset, and
  • a report format file that defines the layout of that data on a page

To create a report, follow these steps:

  1. Choose Query > New Report in the ClearQuest client.
  2. Select a record type. A dialog box will prompt you to associate a query with a report format. Use the Browse button to select from a list of previously saved queries and report formats based on the same record type as the report you're creating.
  3. To create a new report format, choose Query > New Report Format in the ClearQuest client.
  4. Select a record type and click OK, then enter a report format name.
  5. Select the fields you want displayed in your report and click Author Report. At this point, ClearQuest creates a temporary report file in its root directory and launches it with Crystal Reports Designer.
  6. For the simplest report format, choose Insert > Database Field and drag the fields into the Details pane of the Crystal Reports Designer window.
  7. Once you've finished arranging your fields, choose File > Save and File > Exit to save the temporary report format and go back to the ClearQuest client.
  8. Click OK to save the report format file to the database.

1.3. How do I create a new report format in Crystal Reports that includes multiline string fields?

To create a new report format that includes multiline string fields, do the following:

  1. Choose Query > New Report Format in the ClearQuest client.
  2. Select a record type and click OK, then enter a report format name.
  3. Select the fields you want displayed in your report and click Author Report. At this point, ClearQuest creates a temporary report file in its root directory and launches it with Crystal Reports Designer.
  4. Choose Insert > Database Field and drag the fields you desire into the Details pane of the Crystal Reports Designer window.
  5. Once you've finished arranging your fields, choose File > Save and File > Exit to save the temporary report format and go back to the ClearQuest client.
  6. Click OK to save the report format file to the database.

[see Technote 1217221]

1.4. How do I prevent multiline string fields from overwriting other fields in Crystal Reports?

You can use the Format Editor in Crystal Reports Designer to enable a multiline field object to grow up to the full text size. You can also eliminate the overprinting problem by creating multiple sections in an area and placing objects below the multiline fields in separate sections. Once the report runs, the section with the multiline object will finish printing before the section below it prints.

[see Technote 1152480]

1.5. How do I add a new field to my report?

To add a new field to an existing report format, follow these steps:

  1. Right-click the report format name in the ClearQuest client and choose Edit from the menu to get the Edit Report Format dialog.
  2. Under Fields Available for Report, select a field or fields to be added and click the Add button.
  3. Click the Author Report button, and in the Crystal Reports session window choose Database > Verify Database.
  4. Click Yes in the Verify Database alert box and then choose Insert > Database Field.
  5. In the Field Explorer box under Database Fields, select and open the database file. A list of the fields selected earlier in ClearQuest should appear. Drag and drop the new field(s) to the appropriate area in the report format.
  6. Close the Field Explorer box and choose File > Save and then File > Exit to save the changes to the local copy of the report format file and return to ClearQuest.
  7. Click OK to commit the changes to the database.

[see Technote 1124020]

1.6. How do I group reports by a specific field?

To group reports by a specific field, first create your query, then create your report format as follows:

  1. Choose Query > New Report Format and choose the record type.
  2. Select the appropriate fields to be displayed in the "Fields in Report" section.
  3. Click Author Report and choose Insert > Database Field.
  4. Drag and drop the fields to be displayed and close the Insert Fields dialog.
  5. Choose View > Toolbars and check "Supplementary Fields."
  6. Click OK and then click the Insert Group icon in the lower-left corner of Crystal Reports.
  7. Select the field to group by, check the "Keep group together" box, and click OK. This adds a group header and footer.
  8. Choose Format > Section and select "Group Footer #1: ~CRPT.TMP0001.<fieldgrouping> - A."
  9. In the Common tab, check the "New Page After" checkbox and click OK.
  10. Save your changes and then run your report.

1.7. How do I make landscape reports?

While editing your report format file in Crystal Reports Designer, choose File > Printer Setup > Landscape.

[see Technote 1120944]

1.8. How do I export ClearQuest reports to other applications?

You can export a ClearQuest report as a disk file to other applications, including Crystal Reports, Excel, Word, etc. To do so, create and run your report in ClearQuest. On the Crystal Reports toolbar (not the ClearQuest toolbar), click the Export button. (It looks like an envelope with a downward-pointing red arrow, just to the right of the Print button.) With the destination set to Disk File, you'll be able to select from a list of choices.

[see Technotes 1123227, 1177611, and 1118251 ]


Section 2. Working with Queries

  1. How do I retrieve values from the interval between two dates with a ClearQuest query?
  2. How do I set up and run a query from the command line with the ClearQuest UNIX client?
  3. How do I create a query that prompts for the record type or some other search criterion?
  4. How do I create join queries to use in my hooks when I don't know the relationship between tables?
  5. Where are queries stored in ClearQuest?
  6. Is it possible to change all occurrences of a field value in a user database through the ClearQuest client?

2.1. How do I retrieve values from the interval between two dates with a ClearQuest query?

In a ClearQuest query, you can specify two filters in order to retrieve values from the interval between two dates. You do this by choosing two date values as your filters and using an AND statement to tie them together. When you pick the first date value, you specify the operator as "Greater Than" and when you pick the second date value, you specify the operator as "Less Than."

2.2. How do I set up and run a query from the command line with the ClearQuest UNIX client?

You can set up a query using the ClearQuest UNIX client and then run this query using the cqtool command.

[see Technote 1124076]

2.3. How do I create a query that prompts for the record type or some other search criterion?

To create a query that, among other search criteria, prompts for the record type, follow these steps:

  1. Open the Windows client.
  2. Choose Query > New Query from the menu and choose Defect as the record type. Click OK.
  3. Follow the Query Wizard and at the second screen, select Record Type (or some other) as the field to display.
  4. At the next screen, select Record Type and click Next.
  5. At the next screen, select Dynamic Filter and click Run.
  6. In the box asking you to specify the record type, choose the record type you'd like to filter for.

2.4. How do I create join queries to use in my hooks when I don't know the relationship between tables?

You can magically generate any query with the help of the ClearQuest Query Wizard in the client GUI. You can then find the resulting raw SQL statement in the SQL Editor tab of the Query Builder window. If your query returns a list of user names, for example, you can paste that statement directly into an SQL Field Choice List hook of a SHORT_STRING field to generate a pick list. You can also use the (BASIC) Field Choice List hook for extra flexibility and/or extra processing of the result set.

2.5. Where are queries stored in ClearQuest?

Public, private, and start-up queries are stored in a table named Bucket in the user database. The queries are stored in this table in binary form. The actual SQL statements are generated at runtime when the query is executed.

[see Technote 1135267]

2.6. Is it possible to change all occurrences of a field value in a user database through the ClearQuest client?

Yes. As an example, say you wanted to change all instances of the Fruit field from "Apple" to "Orange." Here's what you would do:

  1. Run a query that returns all occurrences of "Apple" for the Fruit field.
  2. Select all of the results of the query.
  3. Choose Action > Modify for the current record displayed.
  4. A Multiple Record Update dialog will pop up and ask if you want your changes to apply to all the rest of the selected records. Click Yes. You'll then have the option to review and make other changes to each record before it's committed to the database or to just let the changes fly.
  5. Once complete, re-run your query and you'll see the changes you just made.

[see Technote 1134214]

Resources

Learn

Get products and technologies

  • To learn more about IBM Rational products, visit the developerWorks Rational zone. You'll find technical documentation, how-to articles, education, downloads, product information, and more.
  • ClearQuest users and administrators can find more resources in the ClearQuest section of the developerWorks Rational zone, including ClearQuest hooks, Eclipse plug-ins, product documentation, articles and whitepapers.

Discuss

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into Rational software on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Rational
ArticleID=398
ArticleTitle=Rational ClearQuest FAQs: Working with reports and queries
publish-date=11202003