Author Topic: Virtual Document ignoring RTFTemplate  (Read 12672 times)

AliBeadle

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Virtual Document ignoring RTFTemplate
« on: July 27, 2021, 12:58:12 am »
I am trying to use Virtual Documents for the first time but having a problem where it appears to be ignoring my RTFTemplate tag and defaulting to 'Model Report'.

I have followed the documentation https://sparxsystems.com/enterprise_architect_user_guide/15.2/model_publishing/virtualdocuments.html to generate a Report Package and some contained Model Documents.

I have used the RTFTemplate tagged value to specify a template for each Model Document.

However when I run the report generator, although it is correctly selecting the packages and contained elements, it is always defaulting to the 'Model Report' template and ignoring my RTFTemplate tagged values.

If I try to generate the document from the Report Package, the 'Template' drop down is greyed out (and set to 'Model Report'). If I try to generate a part of the document from  a Model Document the 'Template' drop down is not greyed out (and set to 'Model Report'). If I generate the document in either case, the output reflects the 'Model Report' template, not the ones specified by the RTFTemplate tagged values.

I am aware of the following previous reports of similar things from this Forum, but they do not seem to be the case here:

https://www.sparxsystems.com/forums/smf/index.php/topic,39259.msg242782.html#msg242782. I can confirm that I am specifying full templates in my RTFTemplate tag, not fragments.

https://www.sparxsystems.com/forums/smf/index.php/topic,39368.msg243219.html#msg243219. I have closed and re-opened the model. The preoblem persists, so does not appear to be a caching issue.

I am running EA 15.1.1528.

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1241
  • Karma: +111/-10
  • Its the results that count
    • View Profile
Re: Virtual Document ignoring RTFTemplate
« Reply #1 on: July 27, 2021, 07:24:19 am »
Sounds like you are doing everything right. Its strange as it works for me and I'm using v15.1 Build 1528 too.

You haven't by chance changed the name of your report and forgot to re-select it in the model document have you? That is the only thing I can think of that might cause that behavior. I Did that my self last year and took while to figure it out.

Happy to help
:)

AliBeadle

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Virtual Document ignoring RTFTemplate
« Reply #2 on: July 27, 2021, 06:46:26 pm »
Thanks for checking. No, it does not seem to be that.

I have re-created the problem with simplest possible case, I think I must be missing a step or using the wrong 'element' somewhere:

* Drag a Report Package onto a diagram - name it but do not change any other settings.
* Open the child diagram formed in the Report Package folder.
* Drag a Model Document onto that diagram.
* Add a tag to the Model Document called RTFTemplate (it is not there by default, but I can add it).
* Edit that RTFTemplate tag to select a document template (it provides a pull down list for this).
* Save changes to all diagrams.
* Select the Report Package, select Report Builder, and press generate.

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1241
  • Karma: +111/-10
  • Its the results that count
    • View Profile
Re: Virtual Document ignoring RTFTemplate
« Reply #3 on: July 28, 2021, 08:23:12 am »
Thanks for checking. No, it does not seem to be that.

I have re-created the problem with simplest possible case, I think I must be missing a step or using the wrong 'element' somewhere:

* Drag a Report Package onto a diagram - name it but do not change any other settings.
* Open the child diagram formed in the Report Package folder.
* Drag a Model Document onto that diagram.
* Add a tag to the Model Document called RTFTemplate (it is not there by default, but I can add it).
* Edit that RTFTemplate tag to select a document template (it provides a pull down list for this).
* Save changes to all diagrams.
* Select the Report Package, select Report Builder, and press generate.
Okay looks like you are following the right steps except that one I highlighted above. The red flag is that adding a tag value manually as it should be added automatically as its stereotyped and part of the MDG profile. Indicates perhaps you aren't using the right diagram and toolbox.
Review what you are doing with virtual document section (p160) of the document reports manual https://www.sparxsystems.com/resources/user-guides/15.2/publish/document-reports.pdf
Happy to help
:)

AliBeadle

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Virtual Document ignoring RTFTemplate
« Reply #4 on: July 28, 2021, 06:05:55 pm »
Ah, that does seem to be the root of the problem, thanks!

I double checked and I think I am using the right diagram (Extended > ModelDocument, but I tried a default 'requirement' diagram as well, same result) and element (Documentation > Report Package). The element I get on the diagram looks like the images in the documentation and is stereotyped as "EAUML::report package", but the Tags pane only has an empty "Package (name)" heading - no default tags!

I don't think I changed anything in the MDG Profile. I created a new project and tried again to check, but with the same result - no default tags.

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1241
  • Karma: +111/-10
  • Its the results that count
    • View Profile
Re: Virtual Document ignoring RTFTemplate
« Reply #5 on: July 28, 2021, 06:21:50 pm »
All out of ideas other than try reinstalling Sparx EA
Happy to help
:)

AliBeadle

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Virtual Document ignoring RTFTemplate
« Reply #6 on: July 28, 2021, 08:02:44 pm »
No problem, thanks for getting me this far.

Tried a clean install of the latest build, still no joy. At least I can describe the problem and what we have tried clearly to the support team. Opening the ticket with support now, will post here if I can add anything useful when they get back to me...

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: Virtual Document ignoring RTFTemplate
« Reply #7 on: July 30, 2021, 09:38:37 am »
I think the problem is that you are looking on the wrong Properties tab. The Virtual Document elements are from an MDG Profile, so the tagged values do not appear on the Tags tab of the Properties window, but on the Element tab, in the <<report package>> and <<model document>> stereotype sections. The RTF Template tag belongs to the Model Document element.

You might have to click off the Model Document element and back on to it to make the section open up. It's shy.
Best Regards, Roy

AliBeadle

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Re: Virtual Document ignoring RTFTemplate
« Reply #8 on: July 30, 2021, 05:56:56 pm »
Ah, that is it! It was staring me in the face too!  :-[

To be fair, the documentation does say "...open the 'Tags' tab of the Properties window..."
(https://sparxsystems.com/enterprise_architect_user_guide/15.2/model_publishing/createadocumentobject.html)
In reply to my support ticket I have suggested a documentation clarification.

Thank you.  :)
« Last Edit: July 30, 2021, 06:05:11 pm by AliBeadle »

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: Virtual Document ignoring RTFTemplate
« Reply #9 on: August 02, 2021, 04:37:26 pm »
To be fair, the documentation does indeed say that, and it is incorrect. I have smacked its bottom and corrected it. The correct version should be published for the next major release of EA.
Best Regards, Roy

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1241
  • Karma: +111/-10
  • Its the results that count
    • View Profile
Re: Virtual Document ignoring RTFTemplate
« Reply #10 on: August 05, 2021, 11:18:45 am »
To be fair, the documentation does indeed say that, and it is incorrect. I have smacked its bottom and corrected it. The correct version should be published for the next major release of EA.
And sent it to bed with out supper too?
Good on ya finding it
Happy to help
:)