Book a Demo

Author Topic: RTF template edition  (Read 3422 times)

illabefat

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
RTF template edition
« on: August 16, 2012, 04:39:16 pm »
I'm trying to write an add-in that generates one report from several others. Little reports have personal template.
So I just use Project.RunReport() method to generate them.
Now I need to add Phase filtering for elements.(and this phase should be set in run-time)
I didn't find any methods for changing templates. Is there any API for that?
And what will you advice to do?

Stefan Bolleininger

  • EA User
  • **
  • Posts: 308
  • Karma: +0/-0
    • View Profile
Re: RTF template edition
« Reply #1 on: August 16, 2012, 06:13:42 pm »
Hi, you can select the template you want to use with

Project.RunReport(PackageGUID, TemplatenameasString, Output-filename);

A nice option for just a few elements or specific items is the usage of a sql-query and export it as XML. then reload the xml and put it into your template.

Alternative: Create individual templates and report them ( much easier)

Second alternative: Export your needed items from several search functions into a preprocessing and store them into the win temp folder als rtf-files. Than run the report you want to have with the EA-internal templates. Next Step: Combine all these files into one document with a postprocess (Word and external template).

With these possibilities you can achieve many reports for each single way and idea :-)

Greetings Stefan
Enterprise Architect in "safetycritical development" like medical device industry. My free Add-in at my Website

illabefat

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: RTF template edition
« Reply #2 on: August 17, 2012, 03:31:34 am »
Thank you!

I need to add the same filter to several RTF templates. Is there any opportunity to automize it? (macro, script, anything)
« Last Edit: August 17, 2012, 06:08:55 pm by illabefat »

Stefan Bolleininger

  • EA User
  • **
  • Posts: 308
  • Karma: +0/-0
    • View Profile
Re: RTF template edition
« Reply #3 on: August 17, 2012, 06:20:21 pm »
Yes, this would be the mentioned option ONE or three.

You may create search functions which can be called directly from an add-in.

Create an add-in for your workflow. You can select a few choices for specific workflows and a template selection. With the workflow you are able to use specific searchfunctions and add them into your template.

The work is worth it :-)
Enterprise Architect in "safetycritical development" like medical device industry. My free Add-in at my Website

illabefat

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: RTF template edition
« Reply #4 on: August 17, 2012, 08:51:09 pm »
But how?
Even if I create addin and search function, how to add it to template?