developers

Bulk reporting

The TM1->Print Report function from Perspectives is useful to generate static reports in bulk for a given set of elements.
The following code is mimicking and extending that functionality to achieve bulk reporting for a TM1 report in a more flexible fashion.
For example you could get a report based on the branches of a company to be saved in each respective branch documents folder instead of getting them all dumped in a single folder or you could also get each branch report emailed to its own branch manager.

Here is the Excel VBA code:

TM1 operators

Logical operators


& AND
% OR
~ NOT

Strings operators


| concatenate
@= string1 equals string2
@<> string1 differs from string2

inserting '&' in strings:
ItemReject('This & That'); will return 'This _That'
ItemReject('This && That'); will return 'This & That'

Dynamic formatting

It is possible to preformat dynamic slices by using the Edit Element Formats button in the subset editor. However that formatting is static and will not apply to new elements of a slowly changing dimension. Also it takes a long time to load/save when you try to apply it to more than a few dozen elements.

As an example, we will demonstrate how to dynamically alternate row colors in a TM1 report for a Customer dimension.

Creating Dynamic Subsets in Applix TM1 with MDX - A Primer

Lead author: Philip Bichard.
Additional Material: Martin Findon.

About This Document

This MDX Primer is intended to serve as a simple introduction to creating dynamic dimension subsets using MDX in TM1. It focuses on giving working examples rather than trying to explain the complete theory of MDX and makes sure to cover the features most useful to TM1 users.

Removing TM1 formulas from Excel sheets

The following code adds a button in your Excel toolbars to replace all TM1 formulas in the current book with their values in order to get your worksheets TM1-free.

It has the following features:

  • toolbar/button for ease of use
  • applies to all sheets in the workbook
  • changes all TM1 DB functions (DBRW, DBR, DBA...) and SUBNM/VIEW into values

This code might get included in a future version of the TM1 Open Source Toolkit

Send email/attachments

It is possible to send email alerts or reports as attachments from Turbo Integrator. This can be achieved by executing a VB script.

  1. Save the attached VB script on your TM1 server
  2. Create a TI process
  3. In the Epilog tab, add the following code:

S_Run='cmd /c D:\path\to\SendMail.vbs smtp.mycompany.com 25 tm1@mycompany.com me@mycompany.com "Today report" "check it out" E:\TM1Reports\todaysreport.xls'
ExecuteCommand(S_Run,0);