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, I am new in Development. My codes run in following way: DEFAULT &ST_PROV_AB = 'ALL'; Table IF &ST_PROV_AB EQ 'ALL' THEN GOTOLBL_USTOTALRPT; -LBL_USTOTALRPT; SUM BY HEADING WHERE STYLE ENDSTYLE -IF &ST_PROV_AB NE 'ALL' THEN GOTO BL_USBYSTATE; -LBL_USBYSTATE SUM BY HEADING WHERE STYLE ENDSTYLE END WHEN I SELECT all it should give a particular kind of report and when ALL is not selected it should give me individual state report. It is done in Text Editor only. Please advice PAThis message has been edited. Last edited by: Kathleen Butler,
Based on what you describe here's an example to follow:
TABLE FILE CAR
-IF &TEST EQ 'ALL' THEN GOTO JUMP;
SUM RCOST DCOST
BY COUNTRY
WHERE COUNTRY EQ 'ENGLAND' OR 'FRANCE';
HEADING
"THIS IS REPORT 1"
-GOTO SKIP;
-JUMP;
SUM SALES
BY CAR
HEADING
"THIS IS REPORT 2"
WHERE RCOST LT 2000;
-SKIP;
END
You have to skip over the second part of your report which is what I think is missing in your pseudocode.
WebFOCUS 8206, Unix, Windows
Posts: 1853 | Location: New York City | Registered: December 30, 2015
Thanks a lot! Let me explain little detailed.I followed the code and get some good results. but still error. I have to create two report: Default @STATE = 'All' , it should give a summary report of State Total Default@ STATE = ' CA' , or any state. It should give individual state report My code: TABLE FILE ABC IF @ STATE EQ 'ALL' THEN GO TO JUMP; SUM BY COV TYPE WHERE COV WHERE DATE HEADING STYLING( DRILL DOWN) ENDSTYLE -GOTO SKIP; -JUMP; SUM BY STATE NOPRINT BY COV TYPE WHERE COV WHERE DATE WHERE STATE HEADING STYLING(DRILL DOWN DIFFERENT COLUMN AS WE ARE SKIPPING ONE BY) ENDSTYLE -SKIP; END
-IF &STATE EQ 'ALL' THEN GOTO SUMRPT ELSE GOTO DETRPT;
-SUMRPT
TABLE FILE CAR
SUM RETAIL_COST
BY COUNTRY
END
-RUN
-GOTO XEND;
-DETRPT
TABLE FILE CAR
SUM RETAIL_COST
BY COUNTRY
BY CAR
BY MODEL
END
-RUN
-XEND
Build two reports and call the one you need. And it's not the only way, there are several one such as having DM between the code, calling different fex, ...
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
I'm with MartinY on this one. You're building a lot of complexity into this code by doing it this way. Maintaining two reports and running the one you want is the right way to do it.
WebFOCUS 8206, Unix, Windows
Posts: 1853 | Location: New York City | Registered: December 30, 2015
hello, Basing on this code I did and my fex is working well give two reports when called. If I give individual states it gives me a report( &STATE = 'CA' and if I give &STATE = 'ALL'IT GIVES ME A summary REPORT OF TOOTALS. however I AM FINDING ONE issues in HTML. I have two control , one is States and another is Date. When I select individual states like CA,NJ,NY... and dates it gives me individual states report. In the States control I also selected display 'ALL' values in setting. When I select 'ALL' it gives me report of all states values. That means the Second report is not picking up. This is my statements -IF &ST_PROV_AB EQ 'ALL' THEN GOTO LBL_USTOTALRPT ELSE GOTO LBL_STATE;
If you've built your control within an HTML page using HTML composer or AppStudio, the 'Add ALL Option' doesn't pass 'ALL' to your fex but by default it's: _FOC_NULL.
So, your -IF &ST_PROV_AB EQ 'ALL' ... will not be true since &STATES will be equal to _FOC_NULL.
Normally, using the 'ALL' option is to "ignore something/a line", this is the action 'executed' by FOCUS when it found, on execution, something such as :
TABLE FILE BLABLA
PRINT *
WHERE BLABLABLA EQ _FOC_NULL;
END
The WHERE is ignore so it's like having a print everything.
But all this is basic FOCUS training, maybe you need some if you don't already ?
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
Originally posted by Squatch: Did you create an HTML page with controls on it? If you did you can see what is being passed by adding these two lines at the top of your fex file:
-? &
-EXIT
If you are not using an HTML page with controls, then make sure 'ALL' is uppercase. In an earlier post, you had lowercase:
Default @STATE = 'All' , it should give a summary report of State Total
Default@ STATE = ' CA' , or any state. It should give individual state report
Dear Squatch, Thanks a lot! I have created three control in HTML. one is for Report selection(WFFMT). SECOND ONE IS DATE AND THIRD ONE IS STATE(The data is populated from &ST_PROV_AB column. -IF &ST_PROV_AB EQ 'ALL' THEN GOTO LBL_USTOTALRPT ELSE GOTO LBL_STATE; In the state control when I select single state it is working fine. I am thinking what to do for ALL option of states and it should give a summary report. In the control of state if I add ALL option from setting it is giving FOC_NUll value which is true according to Martin.sO, DO I have to create a separate control for ALL STATE? AND IF I HAVE TO WRITE FEW FEX code where to write it? Thanks.
As already explained, the "FOC_NULL" value will make WF ignore the WHERE statement, which means you will get all states. You don't have to do anything special in the fex. Have you read the manual regarding "FOC_NULL"? Have you tried running the HTML page, selecting ALL and seeing what is passed to the fex?
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
THANK YOU! I really appreciate your advice and learning codes too but I said very new to development. I have also few trainings from IBI already. Currently cannot do but later yes. All my expectation is working fine in Fex. single state and ALL SUMMSRY States. The problem comes with HTML. In the control of States I want to show LBL_USTOTALRPT (SUMMARY) WHEN I GO 'ALL' option of control of states(HTML). here is my fex. May be I am missing something. -DEFAULT &ISO_CAL_Y_MO_AB ='_FOC_NULL'; -DEFAULT &CV_DSPLY_NA ='_FOC_NULL'; -*-DEFAULT &ST_PROV_AB = 'ALL';(commented when do HTML)
-DEFAULT &WFFMT = 'HTML';
-IF &ST_PROV_AB EQ 'ALL' THEN GOTO LBL_USTOTALRPT ELSE GOTO LBL_STATE;
-LBL_USTOTALRPT TABLE FILE PVT PRINT ISO.. NOPRINT AS 'SNAPSHOT' NEW_M AS 'NO OF CVG' NEW .. AS 'PREMIUM'
ST_PROV_AB NOPRINT AS 'STATE' BY CV_DSPLY_NA AS 'COVERAGE TYPE' WHERE &ST_PROV_AB = '_FOC_NULL'; END TABLE FILE PVTF... SUM ISO NOPRINT AS 'SNAPSHOT' NEW_AS 'NO OF CVG' NEW_ AS 'PREMIUM'
ST_PROV_AB NOPRINT AS 'STATE' BY CV_ AS 'COVERAGE TYPE' HEADING WHERE WHERE ( CV_DSPLY_NA EQ &CV_DSPLY_NA.(OR()).CV_DSPLY_NA. ); WHERE ( ISO_CAL_Y_MO_AB EQ &ISO_CAL_Y_MO_AB.(OR()).ISO_CAL_Y_MO_AB.QUOTEDSTRING); ON TABLE SET STYLE... ENDSTYLE END
-*-DEFAULT &COUNTRY = 'FOC_NULL';
-DEFAULT &COUNTRY = 'ENGLAND';
-IF &COUNTRY EQ 'FOC_NULL' GOTO LBL_USTOTALRPT ELSE GOTO LBL_USBYSTATE;
-LBL_USTOTALRPT
TABLE FILE CAR
SUM SALES
BY COUNTRY
HEADING
"SUMMARY REPORT"
END
-RUN
-GOTO LBL_END
-LBL_USBYSTATE
TABLE FILE CAR
SUM SALES
BY CAR
WHERE COUNTRY EQ '&COUNTRY'
HEADING
"REPORT FOR COUNTRY: <COUNTRY"
END
-RUN
-LBL_END
Switch between the two -DEFAULT statements to see the difference. Then try this with a parameter screen passing the value.
Good luck.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
Use an IBI supplied table to create "reproduce-able" code that any FocalPointer can run and modify. The CAR file is the easiest for this purpose, though it does not have date fields..
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
Thanks. which manuals you are suggesting? And I have no idea about IBI supplied table to create reproduce-able. Is there any video how to approach that? Regards, Niha