Focal Point
[SOLVED] FML Cell Styling Lost

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6777021676

May 12, 2015, 12:13 PM
BobV
[SOLVED] FML Cell Styling Lost
I am new to using FML and have pretty much figured out how it works through research and trial and error. There is one thing I am having a problem with. When I use decimal precision referencing one particular cell, the formatting I have set for that for is lost for that cell:
TABLE FILE M1440A
SUM
LP_ID_CNT/I8C AS '# Customers,Emailed'
ACCT_CNT/I8C AS '# Investment,Accts Opened'
CURR_BAL_AMT/D12.2CM AS 'Total Investment,Account Balances'
COMPUTE AVG_BAL/D12.2CM = CURR_BAL_AMT / ACCT_CNT; AS 'Average Investment,Account Balances'
FOR
DISP AS 'Email Disposition / Control'
'PLAN' AS 'Not Opened' LABEL NOT_OPENED OVER
'RESP' AS 'Opened' LABEL OPENED OVER
'PLAN' OR 'RESP' AS 'Total Email' LABEL EMAIL_TOT OVER
'CONTROL' AS 'Control' LABEL CONTROL OVER
-* When I add decimal precision to the cell in this first RECAP has default styling font 10, Times Roman, Backcolor White
-* Without decimal precision, styling is fine -> Font 9, White, Arial, Backcolor Silver
-* If I take out reference to column (2) and let the calc apply to entire row, styling is fine -> Font 9, White, Arial, Backcolor Silver
RECAP CTL_EM(2)/P6.2C=EMAIL_TOT(2) / CONTROL(2); AS ' ' OVER
-* The next RECAP has decimal precision referencing column (4) and (6), styling is fine as well with all others.
RECAP WHAT_IF_A(4)/P6.2C=CONTROL * CTL_EM(2);
WHAT_IF_A(6)/D12.2CM=CONTROL * CTL_EM(2);
RECAP INCR_A(4)/I8C=EMAIL_TOT - WHAT_IF_A;
INCR_A(6)/D12.2CM=EMAIL_TOT - WHAT_IF_A;
INCR_A(7)/D12.2CM=EMAIL_TOT - CONTROL;
TYPE=REPORT,
FONT='ARIAL',
SIZE=9,
COLOR='BLACK',
BACKCOLOR='WHITE',
STYLE=NORMAL,

Can't figure out what is happening here.

****** Update to original post *********
Ok, I was able to get it to work by ensuring the source data in my RECAP calc are in the same format P6.2C. However, I only want the calculation to have decimal precision. Not the source data (in this case LP_ID_CNT).
****************************************

BobV

This message has been edited. Last edited by: BobV,


WF (App Studio) 8.2.01m / Windows
Mainframe FOCUS 8
May 13, 2015, 08:39 AM
Efrem
BobV,
I'm not sure if this addresses your question.

The below example uses the sample files centstmt.mas/foc in the ibinccen application.

TABLE FILE CENTSTMT
SUM
CENTSTMT.CONSOL.ACTUAL_AMT
CENTSTMT.CONSOL.BUDGET_AMT
FOR
CENTSTMT.ACCOUNTS.GL_ACCOUNT
'2200' AS 'Retail Sales' LABEL R1 OVER
'2300' AS 'Mail Order Sales' LABEL R2 OVER
RECAP R3(1)/D12.3=R1(1);
AS 'Retail Sales Cell'
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET BLANKINDENT ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = endeflt,
$
TYPE=DATA,
LABEL=R3,
COLUMN=N2,
SIZE=8,
STYLE=BOLD+ITALIC,
$
ENDSTYLE
END

Note that R1(1) has a format of D10.0 and the RECAP has a format of D12.3.

The RECAP cell has a Bold/Italic with a Font size of 8.

The above example worked.

Efrem
May 13, 2015, 01:41 PM
BobV
Efrem, I'm not sure your solution worked exactly but it got me thinking based on the example. What I did was to sort of "globally" create a RECAP which is my R3. Like this:
RECAP EM_CTL/D12.2 = ' ';
EM_CTL(2)/D12.2=EMAIL_TOT / CONTROL; AS ' ' OVER

With this, I did not even need to specify the N2 in the stylesheet. I don't really understand it, but got it to work.

thanks for the reply

BobV


WF (App Studio) 8.2.01m / Windows
Mainframe FOCUS 8