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     [SOLVED]Using Computed Fields in the Where Clause

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]Using Computed Fields in the Where Clause
 Login/Join
 
Gold member
posted
Hi All,
We are using WebFocus 7.6.11. I would like use a computed field to force a graph to page break when the count equals to 1. What is the syntax for using the computed field in the where clause? I searched this forum, but didn't find the answer.

Thank you,

Seyed

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


WebFOCUS 8.0.09
App Studio 8009
Linux Kernel-2.6
DBMS: Oracle 11g
all output (Excel, HTML, AHTML, PDF)
 
Posts: 90 | Location: Oklahoma City, Oklahoma | Registered: July 01, 2010Report This Post
Expert
posted Hide Post
WHERE TOTAL CNT EQ 1;


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Gold member
posted Hide Post
Hello Tom,
Thank you so much for helping with this. This answers my question.

Seyed


WebFOCUS 8.0.09
App Studio 8009
Linux Kernel-2.6
DBMS: Oracle 11g
all output (Excel, HTML, AHTML, PDF)
 
Posts: 90 | Location: Oklahoma City, Oklahoma | Registered: July 01, 2010Report This Post
Gold member
posted Hide Post
For some reason the 'WHERE TOTAL' line in the following code doesn't seem to be working. Everything else in the report works fine. Can anyone see what's wrong here. Thanks.

  
TABLE FILE APDISCOUNTS3
PRINT
CTVENO AS 'Supplier'
NANAME AS 'Supplier Name'
VPSLDT AS 'Settled Dt'
VPSCAM/D14.2!D AS 'Settled Amt'
DISCA/D14.2!D AS 'Discount Allowed'
E28/D14.2!D AS 'Discount Taken'
COMPUTE DISCL/D14.2!D = DISCA - E28; AS 'Discount Lost'

ON TABLE SUMMARIZE AS 'TOTAL'
HEADING
"AP Discounts Lost by Cost Center for &MNTH, &ACCYR"
FOOTING
""
WHERE VPSTPR EQ '&ACCPER' AND CTCSTS EQ '&CCENTER';
WHERE TOTAL DISCL NE 0;
END


WebFOCUS 7.6.10
Windows
all output (Excel, HTML, PDF)
 
Posts: 69 | Registered: March 11, 2010Report This Post
Virtuoso
posted Hide Post
Maybe it is working but DISCL has non-zero values that display as zero when rounded to 2 decimal places? Try changing your format for DISCL from 'D' to 'P':

COMPUTE DISCL/P14.2!D = DISCA - E28; AS 'Discount Lost'


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Expert
posted Hide Post
Use another column with NOPRINT and do not use a "reporting/display only" format:
  
    COMPUTE DISCL/D14.2!D   = DISCA - E28; AS 'Discount Lost'
    COMPUTE DISC_LOST/P15.2 = DISCA - E28; NOPRINT

Then use DISC_LOST in the WHERE statement:
   WHERE TOTAL DISC_LOST NE 0;


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Gold member
posted Hide Post
Thanks guys. I followed your suggestions and it worked.


WebFOCUS 7.6.10
Windows
all output (Excel, HTML, PDF)
 
Posts: 69 | Registered: March 11, 2010Report 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     [SOLVED]Using Computed Fields in the Where Clause

Copyright © 1996-2020 Information Builders