IB - Developer Center    Forums  Hop To Forum Categories  WebFOCUS/FOCUS    [SOLVED] Conditional Formatting
Go
New
Search
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Gold member
Posted
Can anyone point out what I am doing wrong here? Well don't point out everything Smiler, but I cannot seem to figure out why my formatting is not taking place.

When I tested this, it worked fine, but I only had 1 record that had PRC_EFF_DAT GT than CURRDATE. New records have been added and my conditional formatting went away.

Thanks for the help

 DEFINE FILE FAM_CAT_PRC
CURRDATE/YYMD=&YYMD;
END
SET BYDISPLAY=ON
TABLE FILE FAM_CAT_PRC
SUM
	  STD_PRC
	  PRC_EFF_DAT NOPRINT
	  CURRDATE NOPRINT
ACROSS SITE_NUM AS ''
BY FAMILY_CAT_ID NOPRINT
BY MAJOR_CATEGORY_DES
BY FAMILY_CATEGRY_DES
BY LINK_ID
BY PROD_DES
WHERE MAJOR_CATEGORY_DES = &MAJOR_CAT_DES.(OR(FIND MAJOR_CATEGORY_DES IN MAJOR_CATEGORY)).MAJOR_CAT_DES.;
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=DATA, COLUMN=STD_PRC, BACKCOLOR=YELLOW, WHEN=PRC_EFF_DAT GT CURRDATE ACROSS SITE_NUM, $ 

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


WebFOCUS 7.6.8
 
Posts: 62 | Registered: January 04, 2008Reply With QuoteReport This Post
Guru
Posted Hide Post
first question- why is your across statement in your when statement


Developer Studio 7.64
Win XP
Output: mostly HTML, also Excel and PDF

"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor
 
Posts: 285 | Location: UK | Registered: October 26, 2007Reply With QuoteReport This Post
Expert
Posted Hide Post
Without looking too deep, have you tried
TYPE=DATA, COLUMN=STD_PRC(*), BACKCOLOR=YELLOW, WHEN=PRC_EFF_DAT GT CURRDATE, $

T



Current Client:WebFOCUS 7.6.2 Win 2003 SE SP2/IIS 6/Tomcat 5.5 - MRE/BID - Win 2003 EE SP1 - MS SQL/Oracle
DevStudio WIN XP SP2 7.6.6 7.6.8 7.6.9 7.6.10
Local:WebFOCUS DevStudio 7.6.10 on Windows XP/IIS/Tomcat - Self Service
 
Posts: 3468 | Location: England U.K. (Freelance) | Registered: April 08, 2004Reply With QuoteReport This Post
Gold member
Posted Hide Post
quote:
Originally posted by nubi:
first question- why is your across statement in your when statement


Sorry, miss print, it should be

 TYPE=DATA, COLUMN=STD_PRC, BACKCOLOR=YELLOW, WHEN=PRC_EFF_DAT GT CURRDATE, $ 



Tony - I tried your suggestion, still no formatting.


WebFOCUS 7.6.8
 
Posts: 62 | Registered: January 04, 2008Reply With QuoteReport This Post
Expert
Posted Hide Post
Tom,

Where in the manual?

I'd love to see a working example.

This doesn't work:

TABLE FILE CAR
SUM
SALES
LENGTH 
COMPUTE FLAG/A1 = IF LENGTH GT 200 THEN '1' ELSE '0'; NOPRINT
ACROSS SEATS
BY COUNTRY
ON TABLE SET STYLE *
TYPE=DATA,  COLUMN=SALES, BACKCOLOR=YELLOW, WHEN=FLAG EQ '1', $
ENDSTYLE
END

It only works for the first column, as I expect it to.


Francis

1: WF 7.6.5 Servlet, Self Service, Dev Studio, IBM HTTP 6.1, AIX 5.3, IBM DB2 8
2: WF 7.6.5 Servlet, Self Service, Dev Studio, MS Windows XP SP2, Apache Tomcat/5.5.25, IBM DB2 8    Output formats: HTML, Excel 2000 and PDF
 
Posts: 4922 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Reply With QuoteReport This Post
Gold member
Posted Hide Post
Tom

I thought I had read that if you have 2 or more conditions that you need to use an IF/THEN/ELSE to give a TRUE/FALSE for conditional formatting. If it's a single condition then what I had should of worked, which it did, when I tested it in the first place with just a single record meeting this criteria.

Since now I have multple records the formatting is not happening.

I tried your sugestion and that still did not accomplish this. I will keep poking around.

Thanks for the suggestions so far.


WebFOCUS 7.6.8
 
Posts: 62 | Registered: January 04, 2008Reply With QuoteReport This Post
Expert
Posted Hide Post
quote:
I purposely left out the correct syntax so the manual would be checked

That's a waste of time.

Thanks for posting a working example.

I thought that COLUMN=SALES would not work, why waste time with posting the wrong syntax?


Francis

1: WF 7.6.5 Servlet, Self Service, Dev Studio, IBM HTTP 6.1, AIX 5.3, IBM DB2 8
2: WF 7.6.5 Servlet, Self Service, Dev Studio, MS Windows XP SP2, Apache Tomcat/5.5.25, IBM DB2 8    Output formats: HTML, Excel 2000 and PDF
 
Posts: 4922 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Reply With QuoteReport This Post
Expert
Posted Hide Post
MattC, try ACROSSCOLUMN instead of COLUMN in the stylesheet.


Francis

1: WF 7.6.5 Servlet, Self Service, Dev Studio, IBM HTTP 6.1, AIX 5.3, IBM DB2 8
2: WF 7.6.5 Servlet, Self Service, Dev Studio, MS Windows XP SP2, Apache Tomcat/5.5.25, IBM DB2 8    Output formats: HTML, Excel 2000 and PDF
 
Posts: 4922 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Reply With QuoteReport This Post
Gold member
Posted Hide Post
Thanks Francis, that worked.

I apologize for being new at this. I do try and research as much as possible before posting up here.

Thanks again.


WebFOCUS 7.6.8
 
Posts: 62 | Registered: January 04, 2008Reply With QuoteReport This Post
Expert
Posted Hide Post
MattC,

I gathered that you had tried researching this problem - I'm sorry other people are wasting our time.

Regards,

Francis.
 
Posts: 4922 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Reply With QuoteReport This Post
  Powered by Social Strata  
 

IB - Developer Center    Forums  Hop To Forum Categories  WebFOCUS/FOCUS    [SOLVED] Conditional Formatting

Copyright © 1996-2009 Information Builders, leaders in enterprise business intelligence.