Focal Point
[SOLVED] How to Apply Multiple Conditional Formattings in Matrix Report (HTML Layout)

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

August 23, 2013, 10:14 AM
Willi
[SOLVED] How to Apply Multiple Conditional Formattings in Matrix Report (HTML Layout)
Hi there,

We need to apply multiple conditional formatting in matrix report with HTML output.

This matrix report needs to meet the following requirements:
1) If the summary of sales is more than 27000, then there is a drill-down URL on that summary value;
2) If the product is "Biscotti" or "Croissant" and the month is "September", then high-light the cell background color as "yellow".

Please see below the sample test fex code:
==========================================
DEFINE FILE GGSALES
MNTH/Mtr=GGSALES.SALES01.DATE;
END
TABLE FILE GGSALES
SUM
GGSALES.SALES01.DOLLARS
BY GGSALES.SALES01.PRODUCT
ACROSS LOWEST GGSALES.SALES01.CITY AS ''
ACROSS LOWEST GGSALES.SALES01.MNTH AS ''
WHERE GGSALES.SALES01.CITY CONTAINS 'Chicago' ;
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = endeflt,$
DEFMACRO=COND0001,MACTYPE=RULE,WHEN=N2 GT 27000,$
TYPE=REPORT,GRAPHCOLOR='GREEN',$
TYPE=REPORT,BORDER-TOP=LIGHT,BORDER-BOTTOM=LIGHT,BORDER-LEFT=LIGHT,BORDER-RIGHT=LIGHT,$
TYPE=ACROSSVALUE,ACROSS=1,BACKCOLOR='WHITE',JUSTIFY=CENTER,$
TYPE=ACROSSVALUE,ACROSS=2,BACKCOLOR=RGB(206 157 255),JUSTIFY=CENTER,$
TYPE=DATA, ACROSSCOLUMN=N1, MACRO=COND0001, TARGET='_new', FOCEXEC=app/test2,$
TYPE=DATA, COLUMN=P10, BACKCOLOR='YELLOW', WHEN=PRODUCT EQ 'Biscotti', $
TYPE=DATA, COLUMN=P10, BACKCOLOR='YELLOW', WHEN=PRODUCT EQ 'Croissant', $
TYPE=DATA, COLUMN=P10, TARGET='_new', FOCEXEC=app/test2, WHEN=N2 GT 27000, $
ENDSTYLE
END
==========================================

It's easy to satisfy just one of the above requirements, but, as far as I know, there is no way to meet both requirements.

Have someone met or solved this scenario before?


Regards and Thanks,
William

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 7.7.03 / 7.6 / 7.1 / 5.3;
HTML / Excel / CSV;
August 23, 2013, 01:20 PM
Willi
(Continue from my previous post)

This issue has been resolved by changing these 3 lines:

TYPE=DATA, COLUMN=P10, BACKCOLOR='YELLOW', WHEN=PRODUCT EQ 'Biscotti', $
TYPE=DATA, COLUMN=P10, BACKCOLOR='YELLOW', WHEN=PRODUCT EQ 'Croissant', $
TYPE=DATA, COLUMN=P10, TARGET='_new', FOCEXEC=app/test2, WHEN=N2 GT 27000, $

to:

TYPE=DATA, COLUMN=P10, BACKCOLOR='YELLOW', WHEN=PRODUCT EQ 'Biscotti', MACRO=COND0001, TARGET='_new', FOCEXEC=app/test2,$
TYPE=DATA, COLUMN=P10, BACKCOLOR='YELLOW', WHEN=PRODUCT EQ 'Croissant',MACRO=COND0001, TARGET='_new', FOCEXEC=app/test2, $

It sounds that WebFOCUS support 2 different conditional formatting at the same time.


Cheers!


WebFOCUS 7.7.03 / 7.6 / 7.1 / 5.3;
HTML / Excel / CSV;