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.
Hi, Please help me in formatting my report's subtotal which is generated through across columns. Below is the code snippet: SUM TOTAL_CNT/D20.2 AS '' BY SERVICE AS 'Service' BY PPC AS O/B' BY TRADE AS 'Trade' ACROSS TITLE_SEQUENCE_NBR NOPRINT ACROSS TITLE_HEAD AS '' ACROSS HEADER_SEQUENCE_NBR NOPRINT ACROSS HEADING_TYPE AS '' ACROSS SUBHEAD_TYPE AS '' ON PORT_CD_CALL_NBR RECOMPUTE AS 'Total' ON TABLE NOTOTAL
I want to apply conditional formatting on the subtotal; if subtotal on any given column is not equla to 100 then it should be in red. I am using below style stmt which applies to all the ST values. TYPE=SUBTOTAL, JUSTIFY=RIGHT, FONT=VERANDA, COLOR=NAVY BLUE,BACKCOLOR=TURQUOISE,STYLE=BOLD,SIZE=8, $ But i want to put some conditions on subtoal. What should be the style statement used for this?
I am using WF7.1.3 on Oracle database on WindowsXP platform.
Hi Frank, This solution is not working with my report. Also the code snippet provided by you doesnt have any ACROSS columns. I tried to tweak it in different ways to make it work with my report but it doesnt work. Please have a look at my code snippet again: =============================================== SUM TOTAL_CNT/D20.2 AS '' BY SERVICE AS 'Service' BY PPC AS O/B' BY TRADE AS 'Trade' ACROSS TITLE_SEQUENCE_NBR NOPRINT ACROSS TITLE_HEAD AS '' ACROSS HEADER_SEQUENCE_NBR NOPRINT ACROSS HEADING_TYPE AS '' ACROSS SUBHEAD_TYPE AS '' ON PPC RECOMPUTE AS 'Total' ON TABLE NOTOTAL ================================================ Basically my report is applying all the ACROSS columns (i.e. TITLE_SEQUENCE_NBR,TITLE_HEAD,HEADER_SEQUENCE_NBR,HEADING_TYPE&SUBHEAD_TYPE) to just one column that is TOTAL_CNT. It means TOTAL_CNT is summarized by all these BY and ACROSS fields. Here is a sample screen shot of my report. Please note that i want to color 99.00 as RED since it is not equal to 100.00.
Period4-2007 TEU DWT Alloc% Alloc% Service Leg O/B Trade Group APX TKY1 GOVT LTED 43.40 RFR 4.70 TPED 50.90 Total TKY1 99.00
I hope i am clear in explaining my problem. Please suggest some solution based on this.
I see what you want.... I will try, but for the next time when you post a question first try to make your example on the CAR or SALES databases, so we can test it...
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006
TABLE FILE CAR
SUM
DEALER_COST
RETAIL_COST
COMPUTE ZERO/D12.2S = IF COUNTRY EQ 'ENGLAND' THEN 0 ELSE SALES;
BY COUNTRY
BY CAR
ACROSS ACC
ON COUNTRY SUBTOTAL AS '*TOTAL'
DEFMACRO=COND0001, MACTYPE=RULE, WHEN=N3 LT 10000,$
TYPE=SUBTOTAL, BY=1, ACROSSCOLUMN=N1, COLOR='RED', MACRO=COND0001,$
this should work....
N1 is the first field you want to display
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006
No, not without some clearer code and output examples.
I cannot actually see what you want here, other than the code I supplied, and using an example on a WF sample datafile, as Frank suggested, is most helpful.
Don't expect our code to just slot in, you have to do somethings yourself, it's the only way to learn.
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
SET NODATA=0 TABLE FILE CAR SUM RETAIL_COST BY CAR BY COUNTRY BY MODEL ACROSS SALES ACROSS LENGTH ACROSS WIDTH ACROSS HEIGHT ON CAR RECOMPUTE AS 'TOTAL' ON TABLE NOTOTAL ON TABLE SET STYLE * TYPE=SUBTOTAL,BY=CAR,ACROSSCOLUMN=RETAIL_COST,COLOR=RED,WHEN=RETAIL_COST GT 6000,$ ENDSTYLE END -EXIT
Just change your stylesheet to
TYPE=SUBTOTAL,BY=PPC,ACROSSCOLUMN=TOTAL_CNT,COLOR=RED,WHEN TOTAL_CNT NE 100,$
Hope this helps
WFConsultant
WF 8105M on Win7/Tomcat
Posts: 780 | Location: Florida | Registered: January 09, 2005
I believe when he put his code first time, he mentioned the Subtotal field wrongly. In his second version of code he mentioned the right BY and SubTotal field.
WFConsultant
WF 8105M on Win7/Tomcat
Posts: 780 | Location: Florida | Registered: January 09, 2005
Hi Alan/Kamesh, Sorry for the delay in response. Actually i had to go out. Thanks for your valuable suggestions, but i had already told you that this solution (i.e. TYPE=SUBTOTAL,BY=PPC,ACROSSCOLUMN=TOTAL_CNT,COLOR=RED,WHEN TOTAL_CNT NE 100,$) is not giving expected results. It applies the formatting in all the ST values whether they are 100 or not. For example, if there are 5 subtotals displayed in the report. 4 of which has 100 and one is having 90, then it is filling RED color in all 5 values instead of coloring just the 90 value. Below are some solutions which i have tried but to no avail: TYPE=SUBTOTAL, BY=2, COLUMN=TOTAL_CNT, COLOR='RED', MACRO=COND0001, $ TYPE=SUBTOTAL, COLUMN=TOTAL_CNT, BY=PORT_CD_CALL_NBR, WHEN=TOTAL_CNT NE 100, JUSTIFY=RIGHT, FONT=VERANDA, COLOR=RED,BACKCOLOR=TURQUOISE,STYLE=BOLD,SIZE=8, $ TYPE=SUBTOTAL, COLUMN=TOTAL_CNT, BY=PORT_CD_CALL_NBR, WHEN=TOTAL_CNT NE 100.00, JUSTIFY=RIGHT, FONT=VERANDA, COLOR=RED,BACKCOLOR=TURQUOISE,STYLE=BOLD,SIZE=8, $ TYPE=SUBTOTAL, ACROSSCOLUMN=TOTAL_CNT, BY=PORT_CD_CALL_NBR, WHEN=TOTAL_CNT NE '100.00', JUSTIFY=RIGHT, FONT=VERANDA, COLOR=RED,BACKCOLOR=TURQUOISE,STYLE=BOLD,SIZE=8, $
None of them is giving me the result explained in the above example.
Also in the solution suggested by you, you are trying to refer ACROSSCOLUMN=TOTAL_CNT, but i think TOTAL_CNT is not at all ACROSSCOLUMN, it is ACROSSVALUE. ACROSSCOLUMNs are TITLE_SEQUENCE_NBR,TITLE_HEAD,HEADER_SEQUENCE_NBR etc... Please correct me if i am wrong somewhere...
Please have a look at my code snippet again: =============================================== SUM TOTAL_CNT/D20.2 AS '' BY SERVICE AS 'Service' BY PPC AS O/B' BY TRADE AS 'Trade' ACROSS TITLE_SEQUENCE_NBR NOPRINT ACROSS TITLE_HEAD AS '' ACROSS HEADER_SEQUENCE_NBR NOPRINT ACROSS HEADING_TYPE AS '' ACROSS SUBHEAD_TYPE AS '' ON PPC RECOMPUTE AS 'Total' ON TABLE NOTOTAL ================================================ Basically my report is applying all the ACROSS columns (i.e. TITLE_SEQUENCE_NBR,TITLE_HEAD,HEADER_SEQUENCE_NBR,HEADING_TYPE&SUBHEAD_TYPE) to just one column that is TOTAL_CNT. It means TOTAL_CNT is summarized by all these BY and ACROSS fields. Here is a sample screen shot of my report. Please note that i want to color 99.00 as RED since it is not equal to 100.00.
Make up your mind which field you are applying the RECOMPUTE on.
ACROSSCOLUMN refers to columns within an across phrase. In your case here TOTAL_CNT.
IF PPC is the point at which you want to SUBTOTAL/RECOMPUTE then:
will work unless you are omitting something important in your code 'snippet'.
quote:
Below are some solutions which i have tried but to no avail: TYPE=SUBTOTAL, BY=2, COLUMN=TOTAL_CNT, COLOR='RED', MACRO=COND0001, $ TYPE=SUBTOTAL, COLUMN=TOTAL_CNT, BY=PORT_CD_CALL_NBR, WHEN=TOTAL_CNT NE 100, JUSTIFY=RIGHT, FONT=VERANDA, COLOR=RED,BACKCOLOR=TURQUOISE,STYLE=BOLD,SIZE=8, $ TYPE=SUBTOTAL, COLUMN=TOTAL_CNT, BY=PORT_CD_CALL_NBR, WHEN=TOTAL_CNT NE 100.00, JUSTIFY=RIGHT, FONT=VERANDA, COLOR=RED,BACKCOLOR=TURQUOISE,STYLE=BOLD,SIZE=8, $ TYPE=SUBTOTAL, ACROSSCOLUMN=TOTAL_CNT, BY=PORT_CD_CALL_NBR, WHEN=TOTAL_CNT NE '100.00', JUSTIFY=RIGHT, FONT=VERANDA, COLOR=RED,BACKCOLOR=TURQUOISE,STYLE=BOLD,SIZE=8, $
And none of them are correct if you are using PPC as your BY/SUBTOTAL.
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
Hi Alan, Sorry that i missed to tell you that PPC and PORT_CD_CALL_NBR are same thing. I had used PPC as an acronym(short form)for PORT_CD_CALL_NBR. I tried this solution but it is still not working. It somehow applies the formatting for the entire subtotal row (i.e. all the values of ST), instead of conditionally applying it. I would have loved to put a snapshot of the report but this editor will not allow me to do so. Any other alternative...
Alan, found the ibisamp directory. There are a lot of files with extensions .fex,.mas,.foc... But i really have no clue about how can i use these to generate some report. I generate reports using some HTML page which calls a .fex file and passes the user given inputs to the .fex file which in turn connects to Oracle database,uses these user inputs to generate some dynamic queries and then finally generates the report. In my type of report generation, i've never used .mas or .foc files. Dont know how can i use the sample files?How can i call them?how to connect to some DB for these sample files? Thanks a lot for your support,but i can use only my code snippets to explain you my problems.
You've helped so many times in the past with my code only, but this time probably i am not able to explain the issue at hand... :-( dont know how to move forward...
Here is the exact code and style statments which i am using to generate report. Hope you'll figure out the problem with this...
SUM TOTAL_CNT/D20.2S AS '' BY SERVICE_CD AS 'Service' BY PORT_CD_CALL_NBR AS 'Leg O/B' BY TRADE_LANE_CD AS 'Trade Group' ACROSS TITLE_SEQUENCE_NBR NOPRINT ACROSS TITLE_HEAD AS '' ACROSS HEADER_SEQUENCE_NBR NOPRINT ACROSS HEADING_TYPE AS '' ACROSS SUBHEAD_TYPE AS '' ON PORT_CD_CALL_NBR RECOMPUTE AS 'Total' ON TABLE NOTOTAL
Now you have found the sample files, I would suggest to copy my smaple script on the CAR database. Create fex in the sammple directory and use my script to see if it meets your requierments.
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006
However, I suspect that your calculation for TOTAL_CNT is the problem.
In your WHEN, you ask for TOTAL_CNT NE 100.00. For numerics, if your field contains 100.0000001, which it may well do after a calculation, it will pass the WHEN and display as RED. This is a problem with any computer calculations, particularly with anything other than a + or - involved.
Alan, It is still not working... but i think we've a clue here, there is something wrong with "100" or "100.005". WF is not able to recognize them. we need to find out something which can be recognized by WF.
Alan, Thanks a ton!!! Finally its working. You've made my day. You've always helped me out whenever i was in a deep trouble. Thanks for your continuous support and patience! Looking forward to learn more and more stuffs about webfocus from u...
Frank was suggesting something about creating CAR database and using sample files of WF. Can u plz throw a little more light on that. As i've never used it before, kindly explain me in a layman's language about the setup and other stuffs like how to start using these samples...