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] Can't open code in GUI - turning comments off and on

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Can't open code in GUI - turning comments off and on
 Login/Join
 
Gold member
posted
Hi - I didn't really know how to describe this situation. I have this code that works...as long as I don't try to open it in the GUI. It wants to get rid of my &COMMENT_xx variables. I use these to turn off/on which fields I want to display depending on what the user selects as the prompt. Is there a better way to do this?
 -PROMPT &MEASURE.(<Road Hazards,ROAD>,<Factory Adjustments,FACADJ>).Select Measure.;

-SET &MEAS_RH = IF &MEASURE EQ 'ROAD' THEN 'YES' ELSE 'NO' ;
-SET &MEAS_ADJ = IF &MEASURE EQ 'FACADJ' THEN 'YES' ELSE 'NO' ;

-SET &COMMENT_RH = IF &MEAS_RH IS 'NO' THEN '-*' ELSE ' ';
-SET &COMMENT_ADJ = IF &MEAS_ADJ IS 'NO' THEN '-*' ELSE ' ';

-*-TYPE MEAS_RH=&MEAS_RH
-*-TYPE MEAS_ADJ=&MEAS_ADJ



JOIN
 SALES_CURR_PREV_FY_US.SALES_CURR_PREV_FY_US.PRODUCT_ID IN SALES_CURR_PREV_FY_US
 TO UNIQUE PRODUCTS_US.PRODUCTS_US.PRODUCT_ID IN PRODUCTS_US TAG J1 AS J1
 END
-***
DEFINE FILE SALES_CURR_PREV_FY_US
SLS_QTY/D12 = IF SALES_SOURCE EQ 'WHSE' OR 'WHSE-LA' OR 'DIR' OR 'NCW' THEN SALES_CURR_PREV_FY_US.SALES_CURR_PREV_FY_US.QTY ELSE 0;
ADJ_QTY/D12 = IF SALES_SOURCE EQ 'FACADJ' THEN SALES_CURR_PREV_FY_US.SALES_CURR_PREV_FY_US.QTY ELSE 0;
RH_QTY/D12 = IF SALES_SOURCE EQ 'ROAD' THEN SALES_CURR_PREV_FY_US.SALES_CURR_PREV_FY_US.QTY ELSE 0;
USR_PRC_BR/A3=IF SALES_CURR_PREV_FY_US.SALES_CURR_PREV_FY_US.PR_BR LT '10' THEN EDIT (SALES_CURR_PREV_FY_US.SALES_CURR_PREV_FY_US.PR_BR,'$$9') ELSE IF SALES_CURR_PREV_FY_US.SALES_CURR_PREV_FY_US.PR_BR LT '100' THEN EDIT(SALES_CURR_PREV_FY_US.SALES_CURR_PREV_FY_US.PR_BR,'$99') ELSE EDIT(SALES_CURR_PREV_FY_US.SALES_CURR_PREV_FY_US.PR_BR,'999');
QTY/I7=QUANTITY * (-1);
END


TABLE FILE SALES_CURR_PREV_FY_US
-*ON TABLE PCHOLD FORMAT HTML
SUM
     SALES_CURR_PREV_FY_US.SALES_CURR_PREV_FY_US.SLS_QTY AS 'Qty Sold'
     &COMMENT_ADJ SALES_CURR_PREV_FY_US.SALES_CURR_PREV_FY_US.ADJ_QTY AS 'Qty Return,Factory Adj'
     &COMMENT_RH SALES_CURR_PREV_FY_US.SALES_CURR_PREV_FY_US.RH_QTY AS 'Qty Return,Road Hazz'
     &COMMENT_ADJ COMPUTE ADJ_PCT_SALES/D9.2% = ( ADJ_QTY / SLS_QTY ) * ( -100 ); AS 'FA,% Sales'
     &COMMENT_RH COMPUTE RH_PCT_SALES/D9.2% = ( RH_QTY / SLS_QTY ) * ( -100 ); AS 'RH,% Sales'
&COMMENT_ADJ BY TOTAL HIGHEST COMPUTE ADJ_PCT_SALES/D9.2% = ( ADJ_QTY / SLS_QTY ) * ( -100 ); NOPRINT
&COMMENT_RH BY TOTAL HIGHEST COMPUTE RH_PCT_SALES/D9.2% = ( RH_QTY / SLS_QTY ) * ( -100 ); NOPRINT

BY  J1.PRODUCTS_US.BUY_LINE
ON TABLE SUBHEAD
"Adjustment % Sales by Buy Line"
"for <+0>&CURR_YTD_ST through &CURR_YTD_DT "
WHERE (( SALES_CURR_PREV_FY_US.XDATE GE '&CURR_YTD_ST_X' ) AND ( SALES_CURR_PREV_FY_US.XDATE LE '&CURR_YTD_DT_X' ));
WHERE J1.PRODUCTS_US.PRICE_LINE NE 'MISCCHGE' OR 'MISCTOT' OR 'ADVERTIS' OR 'BRANDED';
WHERE J1.PRODUCTS_US.BUY_LINE NOT LIKE 'MIEDTPP' OR 'MISC' OR 'COO%' OR 'HI%';
 

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


WebFOCUS 7.7.03
Linux / Universe Db
HTML/PDF/EXCEL/HTML Active
 
Posts: 90 | Registered: November 03, 2009Report This Post
Expert
posted Hide Post
We use this technique all the time, but I would suggest that the comment variable be placed at the first character and have a '.EVAL' after it.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
I don't understand what you mean by the comment variable be placed as the first character. That's where I have it - I think? Could you show me in a line of my code?

Thanks!


WebFOCUS 7.7.03
Linux / Universe Db
HTML/PDF/EXCEL/HTML Active
 
Posts: 90 | Registered: November 03, 2009Report This Post
Expert
posted Hide Post
SUM
     SALES_CURR_PREV_FY_US.SALES_CURR_PREV_FY_US.SLS_QTY AS 'Qty Sold'
     &COMMENT_ADJ SALES_CURR_PREV_FY_US.SALES_CURR_PREV_FY_US.ADJ_QTY AS 'Qty Return,Factory Adj'
     &COMMENT_RH SALES_CURR_PREV_FY_US.SALES_CURR_PREV_FY_US.RH_QTY AS 'Qty Return,Road Hazz'
     &COMMENT_ADJ COMPUTE ADJ_PCT_SALES/D9.2% = ( ADJ_QTY / SLS_QTY ) * ( -100 ); AS 'FA,% Sales'
     &COMMENT_RH COMPUTE RH_PCT_SALES/D9.2% = ( RH_QTY / SLS_QTY ) * ( -100 ); AS 'RH,% Sales'
&COMMENT_ADJ BY TOTAL HIGHEST COMPUTE ADJ_PCT_SALES/D9.2% = ( ADJ_QTY / SLS_QTY ) * ( -100 ); NOPRINT
&COMMENT_RH BY TOTAL HIGHEST COMPUTE RH_PCT_SALES/D9.2% = ( RH_QTY / SLS_QTY ) * ( -100 ); NOPRINT


You should have
SUM
     SALES_CURR_PREV_FY_US.SALES_CURR_PREV_FY_US.SLS_QTY AS 'Qty Sold'
&COMMENT_ADJ.EVAL SALES_CURR_PREV_FY_US.SALES_CURR_PREV_FY_US.ADJ_QTY AS 'Qty Return,Factory Adj'
&COMMENT_RH.EVAL SALES_CURR_PREV_FY_US.SALES_CURR_PREV_FY_US.RH_QTY AS 'Qty Return,Road Hazz'
&COMMENT_ADJ.EVAL COMPUTE ADJ_PCT_SALES/D9.2% = ( ADJ_QTY / SLS_QTY ) * ( -100 ); AS 'FA,% Sales'
&COMMENT_RH.EVAL COMPUTE RH_PCT_SALES/D9.2% = ( RH_QTY / SLS_QTY ) * ( -100 ); AS 'RH,% Sales'
&COMMENT_ADJ.EVAL BY TOTAL HIGHEST COMPUTE ADJ_PCT_SALES/D9.2% = ( ADJ_QTY / SLS_QTY ) * ( -100 ); NOPRINT
&COMMENT_RH.EVAL BY TOTAL HIGHEST COMPUTE RH_PCT_SALES/D9.2% = ( RH_QTY / SLS_QTY ) * ( -100 ); NOPRINT


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
I think it's better to use FOC_NONE (if available in your version of WebFOCUS):

-PROMPT &MEASURE.(,).Select Measure.;

-SET &MEAS_RH = IF &MEASURE EQ 'ROAD' THEN 'YES' ELSE 'NO' ;
-SET &MEAS_ADJ = IF &MEASURE EQ 'FACADJ' THEN 'YES' ELSE 'NO' ;

-SET &COMMENT_RH = IF &MEAS_RH IS 'NO' THEN 'FOC_NONE' ELSE ' ';
-SET &COMMENT_ADJ = IF &MEAS_ADJ IS 'NO' THEN 'FOC_NONE' ELSE ' ';

-TYPE MEAS_RH=&MEAS_RH
-TYPE MEAS_ADJ=&MEAS_ADJ

TABLE FILE CAR
SUM
DEALER_COST
RETAIL_COST
BY COUNTRY
BY CAR &COMMENT_RH
BY MODEL &COMMENT_ADJ
END
-RUN


WebFOCUS 7.6, 7.7
Windows, All Output formats
 
Posts: 90 | Location: Stuttgart | Registered: October 20, 2010Report This Post
Gold member
posted Hide Post
Thank you for the suggestions. Both techniques seem to work with regards to the results of the report. However, neither one allows me to open the fex in the GUI. I'm getting erros parsing the .mas file. I can continue to work around that problem as I've found I have to do that with many of my reports. I just wish there was a way to do this using the tools they want us to use. Thank you!!!


WebFOCUS 7.7.03
Linux / Universe Db
HTML/PDF/EXCEL/HTML Active
 
Posts: 90 | Registered: November 03, 2009Report This Post
Expert
posted Hide Post
quote:
getting erros parsing the .mas file

Are you sue that's due to the fex, not he mas? Do a CHECK FILE FileName to make sure. ... Just a thought.
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Virtuoso
posted Hide Post
No, errors on "parsing the master" is just the report painter not even succeeding in telling what the issue is that it's encountering with the report (namely that it can't deal with intermixed dialog manager code).

Seeing that both bits of code are valid to use there and from the same manufacturer, that's kind of lame.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 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] Can't open code in GUI - turning comments off and on

Copyright © 1996-2020 Information Builders