Reports can be set up to write data into a configured Microsoft Word template. The Office Open XML report can be run from the shortcut menu of an object. Configuration specifies a template document that contains the Microsoft Word template file and an XML control file that identifies the report to run (view definition), and mapping to the text controls in the Microsoft Word document.
The Office Open XML reporting mechanism is a more convenient alternative to the Run and Attach Report command available in SPF 4.4. The SPF 4.4 mechanism used style sheets to format the report, requiring programming knowledge, whereas the Open XML solution uses simple mapping to a pre-configured Microsoft Word template. In order to create a Microsoft Word template for a report, you must create content controls in the Microsoft Word file using controls available from the Developer tab in Microsoft Word.
The Office Open XML report has a template document that identifies the template Microsoft Word document, and control file to map the view definition properties to content controls in the Microsoft Word file. The report can be run and viewed from the short menu of an object, and with configuration, the system can also attach the report file to the object from which it is run.
The following items are required to generate a report using Office Open XML:
-
View Definition
-
Control XML file
-
Microsoft Word template file
-
New Template document object in Data Capture
Reports model
OpenXMLReport Client API
The OpenXMLReport Client API is used to generate the Office Open XML report
Argument |
Name |
Type |
Description |
---|---|---|---|
Arg1 |
Template Name |
String |
This parameter indicates the template document name stored in SmartPlant Foundation. |
Arg2 |
Save and Attach Report |
Boolean |
If this parameter is set to TRUE the generated report is attached to the object from which it was run. |
Arg3 |
Report Configuration |
String |
This parameter indicates the relationship definition and file class definition to be used to attach the report. Format: Reldef~FileClassDef For example, SPFReportFileComposition~SPFReportFile |