[CLOSED] Conditional Styling on the Cell of a Matrix Report
I am trying to put a conditional (WHEN) on following matrix report. Not able to figure out the 'WHEN' part.
TABLE FILE CAR
SUM SALES
ACROSS CAR
BY COUNTRY
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ONLINE-FMT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=REPORT,
BORDER=LIGHT,
FONT='ARIAL',
SIZE=8,
$
TYPE=DATA,
COLUMN=C*,
STYLE=NORMAL,
COLOR=RED,
-* THIS IS WHERE I AM STRUGGLING WITH. Follg does not work.
WHEN=SUM SALES GT 15000,
$
END
This message has been edited. Last edited by: Kerry,
WebFOCUS 5.3.3 MRE - Solaris - Sun Web Server - Weblogic
June 03, 2006, 01:58 PM
susannah
quote:
WHEN=SUM SALES GT 15000,$
change to WHEN=SALES GT 15000,$ Btw, did you use a gui tool to build this fex?This message has been edited. Last edited by: susannah,
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
June 03, 2006, 05:53 PM
Govind Jujare
I browsed manuals and it worked after some tweaking. Now I can style cells greater than zero.
TABLE FILE CAR
SUM SALES
ACROSS HIGHEST COUNTRY
BY MODEL
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ONLINE-FMT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=REPORT,
BORDER=LIGHT,
FONT='ARIAL',
SIZE=8,
$
TYPE=DATA,
-* COLUMN=C*,
ACROSSCOLUMN=N1,
STYLE=NORMAL,
COLOR=RED,
-* WHEN=SALES LT 10000,
WHEN=N2 GT 0,
$
END
WebFOCUS 5.3.3 MRE - Solaris - Sun Web Server - Weblogic
June 05, 2006, 11:32 AM
mgrackin
The key to your solution was to use ACROSSCOLUMN and to remove the word SUM from the WHEN clause as Susannah stated.
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
June 05, 2006, 01:25 PM
Govind Jujare
Yes. Thx to susannah for the idea of removing SUM. Why didn't C* work ?
TABLE FILE CAR
SUM SALES
ACROSS HIGHEST COUNTRY
BY MODEL
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ONLINE-FMT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=REPORT,
BORDER=LIGHT,
FONT='ARIAL',
SIZE=8,
$
TYPE=DATA,
-* Why doesn't C* work?
-* COLUMN=C*,
ACROSSCOLUMN=N1,
STYLE=NORMAL,
COLOR=RED,
-*Remove SUM
-* WHEN=SUM SALES GT 0,
WHEN=SALES GT 0,
$
END
WebFOCUS 5.3.3 MRE - Solaris - Sun Web Server - Weblogic
June 05, 2006, 02:09 PM
mgrackin
Govind,
Unfortunately I can't give you a good answer for that one as to why C* doesn't work in this situation other than to say that it is not intended to be used with matrix reports (BY/ACROSS). You would think that C* should work but obviously does not. Hence the need for using ACROSSCOLUMN.
My guess would be that C* or Cn notation is a way to reference columns in the internal matrix, not actual columns on the report. So due to the fact that the internal matrix does not contain multiple columns for a BY/ACROSS report, only the first column gets the formatting. I'm guessing on this one but I believe the actual ACROSS effect is an output thing in which FOCUS takes the columns in the internal matrix and visually maps them into a matrix for output.
I'm stretching here to explain this behavior so I may be totally off base with my reasoning.
Can anyone confirm my hypothesis?
Thanks!
Mickey
FOCUS/WebFOCUS 1990 - 2011
March 13, 2012, 04:06 AM
Keerthi
quote:
TABLE FILE CAR SUM SALES ACROSS HIGHEST COUNTRY BY MODEL ON TABLE SET PAGE-NUM NOLEAD ON TABLE SET ONLINE-FMT HTML ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * TYPE=REPORT, BORDER=LIGHT, FONT='ARIAL', SIZE=8, $ TYPE=DATA, -* COLUMN=C*, ACROSSCOLUMN=N1, STYLE=NORMAL, COLOR=RED, -* WHEN=SALES LT 10000, WHEN=N2 GT 0, $ END
how can we achieve the same styling in an AHTML report? I used the above code by just replacing HTML with AHTML and it completely removed the styling.