developers

Debugging

AsciiOutput can help tracking what values are being used during execution of your TI processes.

use:

AsciiOutput('\\path\to\debug.cma',var1,var2,NumberToString(var3));

Keep in mind Asciioutput limitations:

Creating temporary views

when creating views from the cube viewer, there is a hard limit to the size of the view displayed. It is 100MB (32bit) or 500MB (64bit) by default, it chan be changed with the MaximumViewSize parameter in the tm1s.cfg
But it is not practical to generate such large views manually.
An alternative is to do it from the Turbo Integrator:

Commenting out portions of code in TI

You would like to comment out portions of code for legacy or future use instead of removing it. Appending # at the front of every line is ugly and messes up the indenting. Here is a quick, neat and simple fix...

############# PORTION COMMENTED OUT
if(1 = 0);

#code to comment out is here

endif;
####################################

That's it. It can come also handy to turn off auto-generated code in the #****GENERATED STATEMENTS START****.

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:

Attributes

Edit Attributes...
if you get the following message "This operation accesses a dimension containing a large number of elements. The uploading of these elements from the server may take a few minutes. Continue?"
Editing directly the attributes cube is much faster:

  • View -> Display Control Objects
  • Open the cube }ElementAttributes_dimension
  • Modify the required fields like in any cube

 

A closer look at dynamic slices

Dynamic slices can be quite useful when the elements you display in your reports evolve over time, they automatically update with the new elements.
The following article will try to dig into the parameters that define these slices and show some of the possibilities to interact with these. The idea was originally submitted by Philip Bichard.

The dynamic slice parameters stored in the names list of the worksheet
to display these in Excel: insert -> name -> paste -> paste list