Publish advanced RPE reports using DNG reporting wizard


This post presents how to customize and run an advanced RPE traceability report directly from DNG Web UI and how you can use one template to generate multiple types of reports.The template used will extract DNG requirements, RQM Test Cases and Test Scripts and RTC Work Items.
The sections covered are:

  • How to upload your RPE template to DNG
  • How to add a stylesheet for nice formatting
  • How to configure filters and document metadata from the DNG Reporting Wizard
  • Other advanced stuff that can be done to suit all reporting needs

Add RPE template to DNG

This section describes very briefly how to upload your template to DNG as this is documented in detail at the following link:
Deploying templates in RRC/DNG

1. Copy the template to the rrdg folder in CLM installation path: <CLM installation path>\server\conf\rm\reporting\initialization\templates\rrdg (ex: C:\Program Files\IBM\JazzTeamServer\server\conf\rm\reporting\initialization\templates\rrdg)
2. Update Manifest file found at <CLM installation path>\server\conf\rm\reporting\initialization\META-INF (ex: C:\Program Files\IBM\JazzTeamServer\server\conf\rm\reporting\initialization\META-INF) with an entry for the new report:

Name: dngTraceability
Location: templates/rrdg/dngTraceability.dta
Label: DNG Collection Traceability
Description: DNG Collection Traceability
Content-Type: application/octet-stream
Is-Report: true
Context: view, collection

3. Issue the reinitialization action by making a request to https://clmserver:port/rm/publish/initialize
4. Refresh DNG in the browser, open the Generate Report dialog (Reports -> Generate a Document-Style Report) and check that your report entry is there

Header Section

Stylesheet, document metadata and macros

For this post I created a stylesheet containing some custom styles, a footer with page information and a text field, a table of contents and a few properties that can be configured from the DNG reporting dialog.
The DNG requirements text contains rich text which will be printed in the document as it is in DNG. I don’t want having so many different font sizes in my document so I will create a macro that sets a uniform font size for all pages except the first.
The custom properties added to the front cover of the stylesheet are: Document Title, Author Name, Current Date and Footer Text. I would like to set these from DNG reporting wizard.

Having this stylesheet, I can now upload it on the jazz server. For a stylesheet to be used with a template, it must have the same name that is used in the Manifest file entry for the Name field, and the .doc extension. The stylesheet has to be uploaded to the word folder in CLM installation path: <CLM installation path>\server\conf\rm\reporting\initialization\templates\word (ex: C:\Program Files\IBM\JazzTeamServer\server\conf\rm\reporting\initialization\templates\word)

In the RPE template I will create an external variable, _runMacro, set the default value the name of the macro I created in the stylesheet and the description to Word Macro (isMacroname:true).

Header Section

For each property I will create an external variable, set a default value that will be used in case nothing is provided, and set the description. The description is important because it will set the name and type for the variable in the DNG dialog. For example the authorName variable has the description set to Author Name(type:text), which means that in DNG the name for the variable will be Author Name and the type is text.

Header Section

What you can do next:

  • Update the stylesheet with features like: add a header with company information or logo, create a style to be applied to all tables in the document, etc
  • Macros can be used for performing all kinds of advanced formatting / post-processing operations: sorting tables, inserting external files, etc

Filters and template sections configuration

In this section it is described how to add a filter for the requirements and how to decide to include sections in the document through variables.

I would like to be able to filter the requirements by artifact type. For this I can add another external variable as shown in the next image and set the condition logic in the RPE template:

Header Section

The default value is “all” which means that if no other value is specified, all artifacts from the collection will be printed in the report.

For some reports I don’t want to print the Test Cases and/or the Work Items. Therefore, I will add two other variables to include or not these sections. Notice how the type for these variables is set to boolean:

Header Section

In DNG you can configure the variables before running the report:

Header Section

What you can do next:

  • External variables provide a lot of flexibility and customization for the reports. You can add more complex filters. sort by specific attribute(s), have more control on what data to be included in the report, etc.

Publishing the report

Now we are going to publish the report using the DNG reporting dialog for a collection in the JKE Banking project.
1. Open the reporting dialog from Reports -> Generate a Document-Style Report
2. Choose the template we uploaded previously, DNG Collection Traceability, and click Next
3. On the second page click Add.. and search for a collection in this project (for this example I used Release 1 Capabilities)

Header Section

4. On the third page enter a name for your report and select the type Microsoft Word; In the Additional Report Information section configure the report data; the last field is the DNG artifact type for the requirements (I will set it to Feature)

Header Section

5. On the next page you can choose to save the report to the project. Click Next
6. Click Finish to generate the report

The output should look as below.
The first page containing the document title, author name and date when the document was published

Header Section

The second page containing a table of contents where you will see that only “Feature” requirements are being printed

Header Section

In the first section of the document the requirements are printed, each on a new page. The table for the requirement contains the internal links to the test case and work item
Notice here the footer text that we configured in the DNG dialog

Header Section

The second section contains the test cases linked to the printed requirements

Header Section

The third section contains the work items linked to the printed requirements

Header Section

Reporting on multiple collections or modules

You can choose to print the report for more than one collection by selecting multiple collections in the second page of the DNG dialog.

More advanced features that can be added

  • You can generate many report types using a single template
  • Add more variables to have better control on what data your report contains
  • Customize the data and style as much as you want
  • Easily adapt the template for modules and views

Enter your email address and we will send you the link to download the resources