Book a Demo

Author Topic: How does RunReport (Java API) work?  (Read 2848 times)

Joe Ammann

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
How does RunReport (Java API) work?
« on: November 29, 2012, 01:22:54 am »
I have written a Java tool (a maven plugin to be exact) to automatically create HTML reports from EA repositories during my nightly build.

I got this to work nicely via the Java API and GetProjectInterface().RunHTMLReport(...)

Next wish from our BAs is that also the RTF document generation can be included in the nightly build. I started playing around with GetProjectInterface().RunReport(...). The documentation is sparse (http://www.sparxsystems.com/uml_tool_guide/sdk_for_enterprise_architect/project_2.htm) and just says

Quote
Runs a named RTF report.

Parameters:

    PackageGUID: String - the GUID (in XML format) of the package to run the report on.
    TemplateName: String - the RTF report template to use. If the PackageGUID has a stereotype of MasterDocument, the template is not required.
    FileName: String - the file name to store the generated report in.

When I call run report on a package that is defined as a master document, the call actually produces an RTF document, but the content does not respect the template that is defined in the master document. I also tried passing the name of the template as the second argument, but no success.

Any idea? Do I need to do something special to use an RTF template via the Java API (the template being used comes as part of an MDG).

Many thanks for any hints!

CU, Joe