How to report from multiple data sources selected dynamically


The example uses DOORS 9 modules but it is applicable to any data source RPE supports.

The problem: create a document from multiple DOORS 9 modules.

The static solution: use the same template multiple times in a docspec with a different module each time. This is what is used in most cases and it’s the simplest solution when you have a fixed list of modules you want to report on.

The dynamic solution:

  • create a list of the DOORS 9 modules you want included
  • iterate the list and reconfigure the template data source with the information read from the list

The list can be kept in a DOORS 9 module or in a separate XML file. The list can generated/altered right before you start the document generation.

The anatomy of the template

  1. go through the module list
  2. use a Dynamic Data Source to configure a new Data Source
  3. render the content of the module

multiTemplate

Download

templateThe template is available for download from the RPE DeveloperWorks wiki page: here

With a DOORS 9 module list that looks like this the RPE template above will create the document from the 3 modules: System Requirements, Stakeholder Requirements, Entertainment System

multiTemplateModuleList

Extending the solution

This is the most basic solution and it can be extended in many ways:

  • add a custom attribute to specify the data source type ( use DNG, RQM, RTC, Rhapsody data sources)
  • add custom attributes to the module list to specify the module baseline and view to use
  • add custom attribute to the module list to specify if the entry in the module list is a module path or some static text that RPE can render as is
  • add custom attribute to the module list to specify the page layout how to use for a specific module ( landscape vs portrait)

Example:

multiTemplateModuleList2

 

 

Advertisements

Author: Dragos Cojocari

Architect for Rational Publishing Engine

1 thought on “How to report from multiple data sources selected dynamically”

  1. Dragos, I wish you could write a little tutorial on how the sample template on the wiki page (referenced above) works. I am finding the Data Source Configuration element very difficult to understand. It seems like a very useful tool if you are doing iterative or looping document generation.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s