Book a Demo

Author Topic: Report builder - make document sections for specific type of elements  (Read 6998 times)

Mezosi.Jozsef

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Hi All!

The thing I'am stuck with: I have a bpmn diagram (has 10 activity) and another diagram (has 10 requirements), the two are under one package. I want to get a report by the report builder that has one list (one table of the document) of the activities and on another list the requirements at another table in the same document.

I have tried document templates. (I set element filter to have activity and requirement but the builder still places the stuff in one table).

Also tried virtual documents (good to include several packages in custom order to run the template on them, but that again prints all the elements into one table.

Also tried model document "Searchname" attribute but that only worked if the custom search was not narrowed down to one package, worked only to run on the whole model.

Also ran around generate document into document artifact, but that didn't work..

So I am totally lost.

Any idea at someone which would get me out of the woods? Please help!

Thanks in advance for any advices you might have.
Jozsef Mezosi

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Report builder - make document sections for specific type of elements
« Reply #1 on: November 02, 2020, 05:34:34 pm »
Use template fragments

For table like templates I usually use an SQL fragment.

Geert

Mezosi.Jozsef

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Report builder - make document sections for specific type of elements
« Reply #2 on: November 03, 2020, 03:08:26 am »
Hi Geert!

In fact I tried template fragment sql-s. I couldn't use it twice in report builder template creation. In order to insert elements (sql for filtering activities) and to a section couple of enters below the other fragment sql (filter for requirements) from the same model. Because as I experimented when you insert for example 2 custom template fragments in between element» «element, the publishing only uses one template fragment and ignores the second one. So the goal to have 2 sections in a document one for including elements (type activity, gathered by a template fragment sql) and a line below in publish document template in between  element» «element is ignored, as a result in the created document only activities are shown. Separately, for each on of template fragments used individually in the template give the correct result. for activity it shows the activities and for requirements it shows the requirements.

Do you have any advise to get the wanted results? Maybe I am not using correctly the applying of multiple templates (fragment sql-s n this case) to take effect on a template element (in this case element, but it could be package, child element as well). Could you please help me around in that?

Thanks is advance:
Jozsef Mezosi

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Report builder - make document sections for specific type of elements
« Reply #3 on: November 03, 2020, 09:13:40 am »
I guess you must be doing something wrong then. I use multiple fragments in a template all the time.

I would suggest you experiment a bit more with some very basic templates to get the hang of it.

Geert

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Report builder - make document sections for specific type of elements
« Reply #4 on: November 03, 2020, 06:10:51 pm »
Hi Jozsef,


What you're describing doesn't sound too complicated.
There are two issues in play: how to construct the templates, and how to invoke them.

Regarding the invocation, you're aware of generation options and of virtual documents, so you've already come a fair way.
I know Geert likes virtual documents, but I prefer writing a document generation script which gives you complete control over the order in which templates are applied. I don't know if that's an option you've considered.

Regarding the templates, it's a bit of work but if you copy-paste them into a post here it's easier to see what's going on.

HTH,


/Uffe
My theories are always correct, just apply them to the right reality.