Best Practices (3/6): Export to Word
You can export to Word in two ways:
-
Using a Master Template
recommended for simple Online Exports- Define one generic master template with company logo, corporate design, table of contents and generic placeholder %CONTENT
% - Include placeholder %FILTER_INFO%:VALUE to display filters of the application
- Select export relevant components using the Visual Components property
- Each component will be exported one after another
- Define one generic master template with company logo, corporate design, table of contents and generic placeholder %CONTENT
-
Using a specific Export Template (see section 3.2 of the User Manual)
recommended for Booklet Exports and sophisticated requirements- Define a special Word template with title page, TOC, chapter headings and texts
- Each component is explicitly included via its own placeholder
- Placeholders can be freely arranged – placeholders can be placed in headers, footers, table cells etc.
- This specific template is uploaded to the server and referenced via property “Template Filename”
Examples for export templates are contained in the Documentation package on the website. Instructions on how to create an Export Template for Word can be found below.
Using a Master Template
The following steps are necessary to create a Master Template for the export (see section 3.1 of the User Manual for details):
-
Create the master template like the following one:
- Create a new Word document according to your corporate guidelines
- Add generic placeholders as “Merge Fields” wherever you like:
- For Export date or time, write %EXECUTION_DATE% or %EXECUTION_TIME% into the field name
- For title, filter or user info, write the component name %TEXT_TITLE%:VALUE, %FILTER_INFO%:VALUE or %TEXT_USER%:VALUE into the filed name
- Add another “Merge Field” and write %CONTENT
% into it. All elements of the Visual Components list will be placed here one after another, each scaled to fit either the width or the height of the current page.
- Store the Word document as master_template.pptx in export_resources subfolder of the Export service installation
- Define the components to be included via property “Visual Components” in the Word group. Make sure “Excluded” is set to false for all entries.
All components will be exported one after another, unless an explicit placeholder has been defined for the component (e.g. the case for TEXT_TITLE or FILTER_INFO).
OPENBIEXPORTTABLE_MR03 has a very special role: As an Export Table it renders those rows of CROSSTAB_MR03, which are hidden by default by the scroll bars (see “Exporting big tables” in “General application design”). The Export Table must be referenced specifically, so its contents are displayed in the Export Document.
Using a Specific Template
The following steps are necessary to create a specific Export Template for the export (see section 3.2 of the User Manual for details). In this example we create a template for a Booklet Export.
-
Create a Word document like the following one:
- Add generic placeholders as “Merge Fields” wherever you like:
- For Export date or time, write %EXECUTION_DATE% or %EXECUTION_TIME% into the field name
- For title or user info, write the component name %TEXT_TITLE%:VALUE or %TEXT_USER%:VALUE into the filed name
- Add “Merge Fields” where you want to include components from the Design Studio application(s). Write the name of the component into the field name, surrounded by % (e.g. %CHART_1%).
You can also use the suffixes :TEXT, :VALUE or :WIDTH[npx] if you want to control the width of the element in Word explicitly (see section 3.2 of the User Manual). - Add filter information via “Merge Field” %FILTER_INFO_xxx%:VALUE.
- Add generic placeholders as “Merge Fields” wherever you like:
- Store the Word docuemnt in export_resources subfolder of the Export service installation
- Write the name of the file into the “Template Filename” property of PowerPoint group.
All components will be exported exactly to those positions, where they were referenced by the placeholder.
Export of Text Components
There are different suffixes available to control how a component replaces the placeholder. Textual components such as title, filter, etc – even the CROSSTAB – can be exported either as images or texts. The following table shows just a few possible placeholders – consult the User Manual for special requirements).
SUFFIX | DESCRIPTION |
---|---|
Component is rendered as an image that fits the page width | |
:VALUE | Value of the component is shown as a text. Formatting is taken from the Export Template. |
:TEXT | Value of the component is shown as a text. The formatting is also taken over from the component. |
This was number 2 in our series of Best Practices Blog Posts, which shall give you several hints how to design you Design Studio application in order to enable export in the best and most efficient way to PowerPoint, Word, PDF and Excel. We describe the export of the current view (referred to as “Online Export”), as well as the automatic export of different views of the application (referred to as “Booklet Export”).
We have started with general export concepts that you should keep in mind when designing an application.
We will finish the series with a “Tips & Tricks” section, which informs you about the most important configuration parameters and how to perform updates.
Check out also the other blog posts about exporting to other document formats!