Focal Point
[CLOSED] Column reference with COMPUTE after ACROSS

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

April 26, 2011, 01:10 PM
BobV
[CLOSED] Column reference with COMPUTE after ACROSS
Somehow, I just cannot figure out what is happening here. It's somewhat a matter of counting columns and referring to them in macros and stylesheets. Below, I have some code where the first two macros work perfectly (macros FUTURE & MISS). But the 3rd macro (TOL) in line does not apply conditional formatting. Again, this is referencing computed fields after an across. I believe I have the proper columns referenced for the macro "TOL". I know that N9 (VALID_OPN_DT_MAX) is the field I want formatting applied. I believe C15 (TOL_MAX_OPN_DT_FLG) is the computed field that is used in the macro.

Note: there are always two possible values in the across value of AS_OF_DT. That's why I want the 2nd across value of VALID_OPN_DT_MAX to get the conditional formatting.

Any help referencing columns or applying macros would be appreciated. I just don't know why two work, but one does not. -BobV
Frowner

TABLE FILE HOLD
SUM
OPN_DT_MIN
OPN_DT_MAX
VALID_OPN_DT_MAX
FUTURE_DT_CNT/I8C
MISSING_DT_CNT/I8C
BY SOURCE
ACROSS AS_OF_DT
COMPUTE
FUTURE_DIFF/I8 = C11 - C4; NOPRINT
COMPUTE
MISSING_DIFF/I8 = C13 - C6; NOPRINT
COMPUTE
DIF_MAX_OPN_DT/I8 = DATEDIF(C9, '&TODAY', 'D'); NOPRINT
COMPUTE
TOL_MAX_OPN_DT_FLG/A1 = IF ( ( SOURCE EQ 'AFS' OR 'ICS' OR 'CLS' OR 'MTG' OR 'RLS' OR 'STL' OR 'TST' ) AND ( DIF_MAX_OPN_DT GT 31 ) ) THEN 1 ELSE IF ( ( SOURCE EQ 'ALS' OR 'CAM' OR 'DDA' OR 'LOC' OR 'MPS' OR 'PH3' OR 'SBA' OR 'TDA' ) AND ( DIF_MAX_OPN_DT GT 3 ) ) THEN ‘Y’ ELSE ‘N’;
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='Letter',
SQUEEZE=ON,
ORIENTATION=LANDSCAPE,
$
DEFMACRO=FUTURE,
MACTYPE=RULE,
WHEN=C11 NE 0,
$
DEFMACRO=MISS,
MACTYPE=RULE,
WHEN=C12 NE 0,
$
DEFMACRO=TOL,
MACTYPE=RULE,
WHEN=C15 EQ 'Y',
$
TYPE=REPORT,
FONT='ARIAL',
SIZE=9,
COLOR='BLACK',
STYLE=NORMAL,
$
TYPE=DATA,
COLUMN=N5,
COLOR='RED',
STYLE=BOLD,
MACRO=FUTURE,
$
TYPE=DATA,
COLUMN=N6,
COLOR='RED',
STYLE=BOLD,
MACRO=MISS,
$
TYPE=DATA,
COLUMN=N10,
COLOR='RED',
STYLE=BOLD,
MACRO=FUTURE,
$
TYPE=DATA,
COLUMN=N11,
COLOR='RED',
STYLE=BOLD,
MACRO=MISS,
$
TYPE=DATA,
COLUMN=N9,
COLOR='RED',
STYLE=BOLD,
MACRO=TOL,
$
ENDSTYLE
END

Was not able actually figure out this problem, but did a work around to create a print field in my hold table that feeds report. Conditional styling works much better on printed fields versus computes after an ACROSS.

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


WF (App Studio) 8.2.01m / Windows
Mainframe FOCUS 8
April 26, 2011, 01:26 PM
Dan Satchell
There is an error in the COMPUTE for TOL_MAX_OPN_DT_FLG. Change the digit 1 to an 'N' or 'Y' and see if that helps.

TOL_MAX_OPN_DT_FLG/A1 = IF ( ( SOURCE EQ 'AFS' OR 'ICS' OR 'CLS' OR 'MTG' OR 'RLS' OR 'STL' OR 'TST' ) AND ( DIF_MAX_OPN_DT GT 31 ) ) THEN 1 ELSE IF ( ( SOURCE EQ 'ALS' OR 'CAM' OR 'DDA' OR 'LOC' OR 'MPS' OR 'PH3' OR 'SBA' OR 'TDA' ) AND ( DIF_MAX_OPN_DT GT 3 ) ) THEN ‘Y’ ELSE ‘N’;


WebFOCUS 7.7.05