Suharsh wrote:Thanks Alan, I checked and as you said TM1RPTROW has a worksheet with name {AR}01.
In case of subsets it becomes obvious as to how the Format Definition is applied in the Column A (Like 0, 1, N ). But if the values are handpicked, in that case does TM1 do a relative assigning of these values in column A (because the elements can be at different level in the hierarchy, one can be a 2nd level consolidation member where as other can be a leaf level)
You're confusing two completely independent aspects of active forms.
The formatting (which is determined by the value in column A) has nothing whatsoever to do with whether the question of whether the elements (which are in column B) are hard coded or subset based.
When you create a new active form by default you get a formula put in column A, that formula being (let's use the case of a form with two row dimensions) something like this:
Code: Select all
=IF(TM1RPTELISCONSOLIDATED($C$23,$C23),IF(TM1RPTELLEV($C$23,$C23)<=3,TM1RPTELLEV($C$23,$C23),"D"),"N")
(The actual column specified will be the last of the row dimensions. So if you had three of them it would point to column D, say.)
That formula is a little hard to get your head around if you aren't familiar with the TM1RPT functions, and doing so is left as an exercise for the reader if you want to. You'll find the relevant documentation of each function in the Reference Guide. (Though the gist of it is that it works out whether it's a consolidation or an N level. If it'[s a consolidation, how many levels away from the top level consolidation is it? (0, 1, 2, 3 or more (D).) There are a few important things to note about it, though:
- The default formula shown above will return one of 6 values; 0, 1, 2, 3, D or N.
- Each potential value corresponds to the formatting that you have specified (or has been specified for you initially) in the formatting block, rows 2 to 7. Column A contains the code, the remaining columns contain the formats to be applied to each column. More importantly, the formatting block is a named range (created when the active form is inserted) called TM1RPTFMTRNG.
Now here are the parts that you need to be clear on:
- The formula shown above is
only a suggestion. You can replace it with any formula you like by changing the formula in column A, on the first row of the active form
only. (You cannot have different formulas on different rows since when you rebuild the form it copies the master row down.) Want the formatting to depend on nothing more than the level of the element? Replace it with an old fashioned ElLev function. Want to base it on just the first character of column B? The Excel Left() function will work just fine. It doesn't matter whether the elements came from a named subset or not; that has no bearing on the formula that you have in column A. All the formula in column A does is tell the form to look up the corresponding row in the formatting block.
- The other thing that you have to do is make sure that for all potential values that you return in your formula, you have a corresponding row in TM1RPTFMTRNG telling the active form how you want to format any rows which return that value. You do not have to use the default values of 0 to 3, N and D. You do not have to use exactly 6 values. You can use more than 6 values or fewer than 6 values, as long as you make sure that you expand or contract the TM1RPTFMTRNG range to match the number of values that you're using.
I hope that clears things up. Failing that you can always wait for the video but it's about the 7th one in the production queue and may be a while...