Author Topic: Report Generation with Virtual Document  (Read 988 times)

Viking

  • EA User
  • **
  • Posts: 247
  • Karma: +1/-2
    • View Profile
Report Generation with Virtual Document
« on: March 10, 2018, 03:30:45 am »
Hi experts,

I am trying to create a report with Virtual Document. The “Master Document” has several “Model Documents” assigned to it. Every “Model Document” knows its own template. I have several questions:

(1) Is there a possibility to retrieve the tagged value of a “Model Document”? I am only able to retrieve the tagged values of a “Master Document”.

(2) Sometimes the “Model Documents” do not use their templates. Instead they use the system Template “Model Report”. Sometimes they use the right template. Is there a rule behind it, when a “Master Document” or “Model Document” uses which rtf template?

(3) I stored the parameters of “Generate Documentation” as a “Defined Document” in Resources. Can I put this element (or a representative) on the diagram of the “Master Document” or any diagram?

(4) Is it possible that a “Filter” retrieves the search value from somewhere, e.g. from the tagged value of “Master Document”?

Many thanks in advance, V.

Viking

  • EA User
  • **
  • Posts: 247
  • Karma: +1/-2
    • View Profile
Re: Report Generation with Virtual Document
« Reply #1 on: March 13, 2018, 06:39:50 am »
My current situation is this and it makes me mad:

(1) Select Master Document (or Report Package) in der Diagram > F8 > in Generate Document: System-Template “Model Report” is default and CANNOT be changed.
(2) Select Package of the Master Document element in the Project Browser: same as above.
(3) Select Master Document in the Project Browser > F8 > in Generate Document: the selection jumps one level up to the package, but Template can be changed. But this is not of any interest for the report generator: it still uses Template “Model Report”. It also create a report about the report elements, which is not intended.
(4) Select Diagram: same as above.

Sometimes the system takes my template, but in only about 5% of the tests.

I did not understand the concept at all or this is a bug.

Help is very welcome, V.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 8173
  • Karma: +193/-22
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Report Generation with Virtual Document
« Reply #2 on: March 13, 2018, 05:49:17 pm »
Hi,

You seem to be making a difference between master document package and master document element. I only see master document packages. Am I missing something.

(1) Master document (packages) don't need templates. The template dropdown is disabled or readonly, and shows the default "Model Report" but is should really be blanked out. So the behavior is what is expected although it can be improved
(2) same as (1)
(3) (supposing you mean "model document element" and not "master document element") I'm not seeing the "jumps one level up to the package" behavior you are describing. I'm currently using 13.5.1352, but I haven't noticed such behavior in previous versions either. In my case it opens up the dialog with the template dropdown filled in with the template from the tagged value. The template dropdown is stil enabled though, so I can select another template if I wanted to.
(4) I don't see different behavior between diagram and project browser.

In all of the above cases the document is generated with the correct template.

We did notice a bug like you are describing sometimes, when pressing F8 right after creating the Master Document package. Then sometimes the dropdown in enabled. In those cases the document would use the model report template and not report on the linked packages/search, but on the master document package itself.
This behavior would be solved by first selecting something else in the project browser and then selecting the Master Document package again. Looks very much like a caching issue to me, like when the application cache isn't aware of the special status (stereotype) of the package yet and treats it as it would be a regular package.

Geert



Viking

  • EA User
  • **
  • Posts: 247
  • Karma: +1/-2
    • View Profile
Re: Report Generation with Virtual Document
« Reply #3 on: March 14, 2018, 02:06:06 am »
Hi Geert,

Thank you very much for your valuable feedback. It helped a lot.

(0) “You seem to be making a difference between master document package and master document element. I only see master document packages. Am I missing something.” -> I am using Report Package (as the successor of Master Document). I am using Model Documents for each Package to be reported and assign these Model Documents to the Report Package.

(1) “Master document (packages) don't need templates. The template dropdown is disabled or readonly, and shows the default "Model Report" but is should really be blanked out. So the behavior is what is expected although it can be improved” -> o.k. This is REALLY confusing. It is even more confusing, that the generate ignores my template assigned as Tagged Values.
(2) same as (1)
(3) “supposing you mean "model document element" and not "master document element") -> no, Master Document (Report Package).
“I'm not seeing the "jumps one level up to the package" behavior you are describing.” -> see above.
“I'm currently using 13.5.1352, but I haven't noticed such behavior in previous versions either. In my case it opens up the dialog with the template dropdown filled in with the template from the tagged value.” -> as I said, the drop down list is inactive.
“The template dropdown is still enabled though, so I can select another template if I wanted to.” -> see above
(4) “I don't see different behavior between diagram and project browser.” -> because I use Report Package (Master Document).

“In all of the above cases the document is generated with the correct template.” -> in my case all use correctly except my own Model Report (which is a copy of the system Model Report). In this case SparxEA uses always the system Model Report. There must be a caching, as you described below.

“We did notice a bug like you are describing sometimes, when pressing F8 right after creating the Master Document package. Then sometimes the dropdown in enabled. In those cases the document would use the model report template and not report on the linked packages/search, but on the master document package itself. This behavior would be solved by first selecting something else in the project browser and then selecting the Master Document package again. Looks very much like a caching issue to me, like when the application cache isn't aware of the special status (stereotype) of the package yet and treats it as it would be a regular package.” -> could you tell me what you mean with “linked packages/search”? The Report Generator uses the right package, but the wrong template (in my case the system Model Report).

V.

Viking

  • EA User
  • **
  • Posts: 247
  • Karma: +1/-2
    • View Profile
Re: Report Generation with Virtual Document
« Reply #4 on: March 14, 2018, 02:59:05 am »
Hi Geert,

It works now. It was the caching issue, I think. Many thanks. V.
« Last Edit: March 14, 2018, 05:12:57 am by Viking »