Book a Demo

Author Topic: conditionnal formatting  (Read 3445 times)

webrod

  • EA User
  • **
  • Posts: 22
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
conditionnal formatting
« on: July 16, 2008, 01:08:40 am »
Hi,

is there a way to add conditionnal-formatting when designing a RTF report?
For example, when a list of elements is displayed, I would like to be able to display the "Name" and the "Notes" field when the element is a "requirement" and only the "name" when the element is a use case
For example today we can only do that:
Element>
{Element.Name} {Element.Notes}
<Element
(So requirements and Use cases have the same formatting)

I shall be able to do that:
Element>
Requirement>
{Element.Name} {Element.Notes}
<Requirement
UseCase>
{Element.Name}
<UseCase
<Element

Is there a solution?
thanks you  :)
rod

Luis J. Lobo

  • EA User
  • **
  • Posts: 252
  • Karma: +0/-0
  • IT Consultant
    • View Profile
Re: conditionnal formatting
« Reply #1 on: July 16, 2008, 01:25:56 am »
It's possible.

Create a RTF template called "Requirements" with the <element> format definition you wish
Create a RTF template called "Use Cases" with the <element> format definition you wish.

1. Option 1: if you have the requirementes and the use cases in different package:

1.1 Create a virtual document (class with <<model document>> stereotype) and drag&drop the requirements package and use cases package. They will appear as attributes of the <<model document>> class.

1.2 Select the first attribute: in the Tagged values window, you will see the Tag "RTF Template". Select the "Requirements" template.

1.3 Select the second attribute: in the Tagged values window, you will see the Tag "RTF Template". Select the "Use Case" template.

1.4 Generate the <<model document>> pressing F8. The generated document will contain the requirements defined as "Requirements" template says, and the same for the use cases.

2. Option 2: If you have the requirements and use cases in the same package, repeat the previous steps, but modify the templates to make them only document Requirements & Use cases respectively and drag & drop to the <<model document>> the same package two times.

webrod

  • EA User
  • **
  • Posts: 22
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: conditionnal formatting
« Reply #2 on: July 16, 2008, 04:26:53 pm »
Hello,

thanks for your answer.
But it is not what I am expecting.
This is the way to generate a document with first ALL the requirements, then ALL the use cases.
Let's say that I have REQUIREMENTS and USE CASES in the same package.
Like this:
REQ1
UC1
REQ2
UC2

I don't want to print:
REQ1
REQ2
UC1
UC2

I want them in the same order.
That's why I can't use 2 templates.

The only way to do this would be a conditional formatting.
It would be that:
Element>
Requirement>
{Element.Name} {Element.Notes}
<Requirement
UseCase>
{Element.Name}
<UseCase
<Element

But I am not sure whether it is possible or not.

thanks

rod

Luis J. Lobo

  • EA User
  • **
  • Posts: 252
  • Karma: +0/-0
  • IT Consultant
    • View Profile
Re: conditionnal formatting
« Reply #3 on: July 16, 2008, 05:51:25 pm »
Filtering is not possible.

For the Requirements only, there is an alternative:

The <External Requirements> section allows you to render in a different way the use cases (or any other element) and related requirements, as you want:

element>
{Element.Name}   -->render the use cases as you like
external requirements>
{ElemExtRequirement.Name} {ElemExtRequirement.Notes}  --> render the requirements as you like
<external requirements
element>