MicroStrategy ONE

About object templates

Object templates allow you to start with a predefined structure when creating a new object.

For example, you may want to create many filters that contain the current month as part of the definition. Having a filter object template that contains the current month allows you to skip the step of defining that part of the filter each time you create a filter. In other words, you only have to define that filtering condition once. When you use the filter object template, you automatically have the current month condition in every new filter you create.

Another example is a need to build multiple reports containing the attribute Day and the metrics Revenue, Cost, and Profit. To reduce the time spent creating these similar reports, define a report with these objects and save it as an object template for reports.

Object templates allow you to create objects by means of predefined templates; this option allows template creation for:

  • Consolidations

  • Custom groups

  • Documents

  • Filters

  • Intelligent Cubes

  • Metrics

  • Reports

  • Templates (A template defines the layout of general categories of information in a report. It does not include filter information. For more information, see About report templates.)

This topic contains the following information:

Pre-defined object templates for reports

MicroStrategy comes with a set of pre-defined object templates which you can use to build your own reports. These templates let you create a new report quickly because the template already contains common objects and basic filters. When you create any new report, you can start with an existing template, which will shorten the time that it takes to produce the finished report. The New Grid dialog box opens whenever you create a new report, and this is where you can select an existing template on which to base the new report.

For additional information on pre-defined report object templates, refer to the Building Query Objects and Queries, for Designers chapter of the Basic Reporting Help.

These are not the same as report templates, which are usually created and used by more advanced users. A report template defines the layout of general categories of information in a report. In a report template, you specify the information that you want to retrieve from your data source, and the way that you want the data to be displayed. A report template does not include filter information, while a report object template can contain filters. A report template is already a report and could be run as is, without modifications. You cannot run a report object template as is; you must move objects from Report objects to the report grid first. For details on report templates, see About report templates.

Empty object templates

Empty object templates are a subset of object templates. The only difference between the two is that object templates contain a definition and empty object templates do not. Empty object templates define default formatting and other properties on a project level for new reports, templates, metrics, Intelligent Cubes, and documents.

There are two kinds of empty object templates:

  • Empty object templates automatically provided in MicroStrategy. These are displayed in the New Object dialog box as Empty Document, Empty Intelligent Cube, Empty Metric, Empty Report, and Empty Template. An empty object template does not really exist, as an object. Instead, it is created dynamically using a set of default properties.

    You can choose whether or not to display the empty object template for a particular object type. For instructions, see Object templates at the project level.

  • User-defined empty object templates. These help you control new objects created in your project, by specifying a default set of properties that should be applied to each new object. If you create a user-defined empty object template with those properties, you do not have to define those properties for each new object, saving time and ensuring consistency.

    For example, you can create a user-defined empty metric template with currency formatting or a user-defined empty report object template set to outline mode. Notice that the user-defined empty object template contains properties only, not a "definition" that is, user-defined empty metric templates do not have formulas; user-defined empty report templates do not include attributes, metrics, or other grid units in the report objects. Unlike the MicroStrategy-provided empty object templates, a user-defined empty object template is a static object.

User-defined empty object templates are saved in the Object Templates folder since they can be used only as a template.

User-defined empty object templates

The properties available in a user-defined empty object template vary with the type of object, as described below:

  • An empty metric object template does not contain a formula but can contain the following properties:

    • Formatting properties

    • VLDB properties

    • Formula join type

    • Metric join type

    • Metric column properties

  • An empty report object template does not contain any grid units, that is, attributes, metrics, consolidations, and so on, but can contain the following properties:

    • Export options

    • Filters

    • Formatting

    • Grid options

    • Report data options

    • VLDB properties

    • Other settings such as merge header cells and automatic column width

    • An empty template object template is similar to an empty report object template.

For example, your project has a series of reports that must be exported in Excel format to a particular location. A specific Excel macro must be run after the report is exported. You can create a user-defined empty report object template, called Excel Export Settings, with these specifications. When the Excel Export Settings report object template is used to create a new report, the new report contains the correct Excel information.

A user-defined empty metric object template contains formatting and other properties but does not include formulas. Like user-defined empty report object templates, they can be used as a starting point for creating objects with specific preset properties. For example, a project requires all currency values to include cents for precision and to distinguish negative values in red font. To meet these conditions, create an empty metric object template named Currency Formatting and set these formats. When a user creates a new metric that returns currency values, he selects Currency Formatting in the New Metric dialog box. The formatting for red negative values and cents is included in the new metric.

Using object templates

To use an object template, simply begin creating a new object. In the New Object dialog box, review the object templates and select the one that suits your needs. In the editor, modify the object template to create the new object.

If the New Object dialog box does not open, object templates are not shown for that type of object. You can enable object templates by following the instructions in Enabling object templates.

If you do not want to use object templates for a specific object type, follow the instructions in Disabling object templates. The default object template, which is defined at the project level, is automatically used when you create a new object of that type. If a default object template is not defined, the empty object template is used. The empty object template is provided by MicroStrategy and created dynamically using a set of default properties. For more information on the default object template and the empty object template, see Object templates at the project level.

Disabling object templates for reports also disables object templates for Intelligent Cubes. In addition, users cannot create reports that access Intelligent Cubes, MDX cube sources, or Freeform sources, or Intelligent Cubes that access MDX cube sources or Freeform sources.

Related Topics