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.
Hello, If I do HTML document and use Ignore filter as FOC_NOne we get a different result when we use -FOC_NULL . nihaThis message has been edited. Last edited by: Kathleen Butler,
FOC_NONE causes the line of code to be ignored, as if that line were blank. The line need not be a WHERE phrase -- for example, it can be employed to eliminate a BY clause or a verb object.
_FOC_NULL forces a WHERE condition to evaluate as "True", regardless of the incoming data values.
Now is the report's behavior clear?
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
hello, We are trying to execute the following code to set report header but it is not working. -IF '&ST_PROV_MXCSH_NA' EQ 'FOC_NONE' THEN GOTO ALLHDR; -IF '&ST_PROV_MXCSH_NA' EQ '_FOC_NULL' THEN GOTO SUMMHDR; -SET &RPT_HEADER = 'US TOTAL BY STATES'; -GOTO ENDHDR -SUMMHDR -SET &RPT_HEADER = 'US SUMMARY'; -GOTO ENDHDR -ALLHDR -SET &RPT_HEADER = 'US TOTAL ALL STATES'; -ENDHDR
THE FOLLOWING CODES WORKS FINE FOR THE REPORT DEFINE FILE PVTFT001_COV_MO_FT ADD ST_PROV_MXCSH_NA/A30=IF '&ST_PROV_MXCSH_NA' EQ '_FOC_NULL' THEN 'ALL' ELSE PVTFT001_COV_MO_FT.T8_PVTDM061_LOC_DM.ST_PROV_MXCSH_NA; END PLEASE SUGGEST NP
I suppose that &ST_PROV_MXCSH_NA is a parameter which is provided by a portal control field meaning that value/option can be selected such as "US Summary", "US Total All States" and "US Total By States".
As a simple way I will have that control define as a radio with three options (same as above) and where each of them have its own returned value (where it could be 1 = "US Summary", 2 = "US Total All States" and 3 = "US Total By States".
According to this, your code become:
-IF &ST_PROV_MXCSH_NA EQ 1 THEN GOTO SUMMHDR;
-IF &ST_PROV_MXCSH_NA EQ 2 THEN GOTO ALLHDR;
-SET &RPT_HEADER = 'US TOTAL BY STATES';
-GOTO ENDHDR
-SUMMHDR
-SET &RPT_HEADER = 'US SUMMARY';
-GOTO ENDHDR
-ALLHDR
-SET &RPT_HEADER = 'US TOTAL ALL STATES';
-ENDHDR
DEFINE FILE PVTFT001_COV_MO_FT ADD
ST_PROV_MXCSH_NA/A30=IF &ST_PROV_MXCSH_NA NE 3 THEN 'ALL' ELSE PVTFT001_COV_MO_FT.T8_PVTDM061_LOC_DM.ST_PROV_MXCSH_NA;
END
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013
Thats assuming niha is doing multiple actions. I'm just going on what was presented in the example. That's all. Like I said... not really what the point of the thread is. Just a bit of a detour.
Eric Woerle 8.1.05M Gen 913- Reporting Server Unix 8.1.05 Client Unix Oracle 11.2.0.2
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013
Thank you all for the suggestions, but we are trying without radio button. From the html doc we can select FOC_NONE for Ignore Filters, and add All & No Selection from the setting for the Listbox.
When you do that, it passes _FOC_NULL for 'No Selection' and FOC_NONE for 'ALL'. the report works fine, but we are trying to create a Header for three different options...
We tried the following also, but it does not work since it can not validate 'FOC_NONE'...
SET &RPT_HEADER = IF '&ST_PROV_MXCSH_NA' EQ '_FOC_NULL' THEN 'US SUMMARY' ELSE IF '&ST_PROV_MXCSH_NA' EQ 'FOC_NONE' THEN 'US TOTAL ALL STATES' ELSE 'US TOTAL BY STATE';
We are trying to find out is there a way to identify the 'FOC_NONE' and code accordingly...
The -IF and -GOTO was just to try in a different way...
Trying to test FOC_NONE (and either _FOC_NULL) is sometime a pain...
Try
SET &RPT_HEADER = IF '&ST_PROV_MXCSH_NA.EVAL' EQ '_FOC_NULL' THEN 'US SUMMARY' ELSE IF '&ST_PROV_MXCSH_NA.EVAL' EQ 'FOC_NONE' THEN 'US TOTAL ALL STATES' ELSE 'US TOTAL BY STATE';
Using a radio may be an easy way, but you can do the same with list box, drop down, ... until the proper values are built in the control.
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013
That was great!!! I totally forgot about the .EVAL, thanks.
It works now for 'No Selection' and 'ALL' perfectly but does not work if I select one or mutiple states:
-SET &RPT_HEADER = IF ''California'' EQ '_FOC_NULL' THEN 'US SUMMARY' - ELSE IF ''California'' EQ 'FOC_NONE' THEN 'US TOTAL ALL STATES' - ELSE 'US TOTAL BY STATE'; 0 ERROR AT OR NEAR LINE 86 IN PROCEDURE practice_covsel_001_ustotalsms_mainFOCEXEC * (FOC266) IF .. THEN .. ELSE .. SYNTAX ERROR
-IF &ST_PROV_MXCSH_NA CONTAINS 'OR' THEN GOTO WITHOR;
-SET &RPT_HEADER = IF '&ST_PROV_MXCSH_NA.EVAL' EQ '_FOC_NULL' THEN 'US SUMMARY' ELSE IF '&ST_PROV_MXCSH_NA.EVAL' EQ 'FOC_NONE' THEN 'US TOTAL ALL STATES' ELSE 'US TOTAL BY STATE';
-GOTO ENDSET;
-WITHOR
-SET &RPT_HEADER = 'US TOTAL BY STATE';
-ENDSET
I wrote it : "a pain..."
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013
It all worked, just don't need the ticks... -SET &RPT_HEADER = IF &ST_PROV_MXCSH_NA.EVAL EQ '_FOC_NULL' THEN 'US SUMMARY' - ELSE IF &ST_PROV_MXCSH_NA.EVAL EQ 'FOC_NONE' THEN 'US TOTAL ALL STATES' - ELSE 'US TOTAL BY STATE';
Thank you all for the suggestions...good discussion..