Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Computed flags not recognized for stylesheet.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Computed flags not recognized for stylesheet.
 Login/Join
 
Master
posted
I have created this flag to control how various rows are displayed in a PDF or EXL2K report:
quote:

COMPUTE PAMFLAG/A1 = IF (PCTALLMEET FROM 91 TO 100) THEN '1'
ELSE IF (PCTALLMEET EQ 90) THEN '2'
ELSE IF (PCTALLMEET FROM 75 TO 89) THEN '3'
ELSE IF (PCTALLMEET FROM 0 TO 74) THEN '4' ELSE '0';

Here is the stylesheet code:
quote:

$
TYPE=DATA,
COLOR='WHITE',
STYLE=BOLD,
BACKCOLOR='BLUE',
WHEN=PAMFLAG EQ '1',
$
TYPE=DATA,
COLOR='WHITE',
STYLE=BOLD,
BACKCOLOR='GREEN',
WHEN=PAMFLAG EQ '2',
$
TYPE=DATA,
COLOR='BLACK',
STYLE=NORMAL,
BACKCOLOR='YELLOW',
WHEN=PAMFLAG EQ '3',
$
TYPE=DATA,
COLOR='BLACK',
STYLE=NORMAL,
BACKCOLOR='RED',
WHEN=PAMFLAG EQ '4',
$

Whenever I have a PCTALLMEET value of 74 or 91 show in the report, the backcolor is WHITE,
rather than a backcolor=RED for 74 and backcolor=BLUE for 91.

I have also coded it as:
quote:

COMPUTE PAMFLAG/A1 = IF (PCTALLMEET GE 91) AND (PCTALLMEET LE 100) THEN '1'
ELSE IF (PCTALLMEET EQ 90) THEN '2'
ELSE IF (PCTALLMEET GE 75) AND (PCTALLMEET LE 89) THEN '3'
ELSE IF (PCTALLMEET GE 0) AND (PCTALLMEET LE 74) THEN '4' ELSE '0';

but it does not matter. Is there another way to compute a flag for a range of values? Confused

Thanks!

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


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 573 | Location: Baltimore, MD | Registered: July 06, 2006Report This Post
Guru
posted Hide Post
HAVE YOU TRIED IT THIS WAY?

 
COMPUTE PAMFLAG/A1 = IF (PCTALLMEET GT 90) AND (PCTALLMEET LT 101) THEN '1'
ELSE IF (PCTALLMEET EQ 90) THEN '2'
ELSE IF (PCTALLMEET GT 74) AND (PCTALLMEET LT 90) THEN '3'
ELSE IF (PCTALLMEET GE 0) AND (PCTALLMEET LT 75) THEN '4' ELSE '0';

 


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
 
Posts: 398 | Registered: February 04, 2008Report This Post
Guru
posted Hide Post
In your computed field make your range order from lowest to highest.

  
TABLE FILE CAR
PRINT
     CAR
	 SALES
	 COMPUTE PAMFLAG/A1 = IF (SALES FROM 0 TO 4800)THEN '1'
                          ELSE IF (SALES FROM 4801 TO 13000) THEN '2'
                          ELSE IF (SALES FROM 13001 TO 14000) THEN '3'
                          ELSE IF (SALES FROM 14001 TO 15600) THEN '4' ELSE '0';
BY
     COUNTRY
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE SET ONLINE-FMT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     PAGESIZE='SCREEN',
     LEFTMARGIN=0.000000,
     RIGHTMARGIN=0.000000,
     TOPMARGIN=0.000000,
     BOTTOMMARGIN=0.000000,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=9,
     COLOR='BLACK',
     BACKCOLOR='NONE',
     STYLE=NORMAL,
     RIGHTGAP=0.125000,
     TOPGAP=0.013889,
     BOTTOMGAP=0.027778,
$
TYPE=TITLE,
     STYLE=BOLD,
$
TYPE=DATA,
COLOR='WHITE',
STYLE=BOLD,
BACKCOLOR='BLUE',
WHEN=PAMFLAG EQ '1',
$
TYPE=DATA,
COLOR='WHITE',
STYLE=BOLD,
BACKCOLOR='GREEN',
WHEN=PAMFLAG EQ '2',
$
TYPE=DATA,
COLOR='BLACK',
STYLE=NORMAL,
BACKCOLOR='YELLOW',
WHEN=PAMFLAG EQ '3',
$
TYPE=DATA,
COLOR='BLACK',
STYLE=NORMAL,
BACKCOLOR='RED',
WHEN=PAMFLAG EQ '4',
$
ENDSTYLE
END
-EXIT


WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
 
Posts: 320 | Location: Memphis, TN | Registered: February 12, 2008Report This Post
Virtuoso
posted Hide Post
There are 101 different ways to code the compute, but before figuring out why the stylesheet is not working, look at what the values of the computed field PAMFLAG and reference field PCTALLMEET are. If you are doing a COMPUTE instead of a DEFINE I would guess maybe you are doing a SUM in which case the '74' values may be some multiple of 74.

Here's the way I would code your flag:

COMPUTE PAMFLAG/A1 =
IF PCTALLMEET LT 75 THEN '4' ELSE
IF PCTALLMEET LT 90 THEN '3' ELSE
IF PCTALLMEET EQ 90 THEN '2' ELSE
IF PCTALLMEET LE 100 THEN '1' ELSE '0';

Forget about the ranges, just let it flow through natural logic.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Virtuoso
posted Hide Post
Indeed, first run the report with all fields visible without bothering to look at the styling, but to look if all field values are correct.
Only when that is correct, take a closer look at your stylesheet.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Platinum Member
posted Hide Post
How does the "FROM-TO" logic work? Without being an expert, it seems like FROM is analagous to > and TO is <. So if you have exactly 91, it doesn't fit the criteria.

Maybe try something like Rsquared suggested or make your statement FROM 90 TO 100.


WebFOCUS: 7702
O/S : Windows
Data Migrator: 7702
 
Posts: 127 | Location: San Antonio | Registered: May 29, 2009Report This Post
Virtuoso
posted Hide Post
FROM-TO logic is inclusive, meaning greater- than-or-equal-to and less-than-or-equal-to


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Expert
posted Hide Post
I would recommend using the approach Darin suggests and use the logically route. Of course the values used do really depend upon the format of the field being tested.


Tom,

What are the USAGE and ACTUAL formats of the field PCTALLMEET?

If decimal fomrat then even more reason to use Darin's suggestion, although I would modify it to -
COMPUTE PAMFLAG/A1 = 
IF PCTALLMEET LT  0 THEN '0' ELSE
IF PCTALLMEET LT 75 THEN '4' ELSE
IF PCTALLMEET LT 90 THEN '3' ELSE
IF PCTALLMEET LT 91 THEN '2' ELSE
IF PCTALLMEET LT 101 THEN '1' ELSE '0';

This way you get ranges of 0 - 74.9999~, 75 - 89.9999~, 90 - 90.9999~ and 91 - 100.9999~ which is what you are after?

T

This message has been edited. Last edited by: Tony A,



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Computed flags not recognized for stylesheet.

Copyright © 1996-2020 Information Builders