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, I am new to webFOCUS.I have two filters in my report. 1. Year 2. Month
When i select a year i get the aggregated sales grouped by year. What i need is when i select year and month (ie) 2013 and all months i need my graph to group by month. How can i achieve this.
I am attaching a sample car code.
-SET &ORDER_BY = IF &COUNTRY NE _FOC_NULL THEN COUNTRY ELSE _FOC_NULL OR IF &CAR NE _FOC_NULL THEN CAR ELSE _FOC_NULL
TABLE FILE CAR SUM CAR.BODY.DEALER_COST CAR.BODY.RETAIL_COST BY &ORDER_BY
WHERE ( CAR.ORIGIN.COUNTRY EQ &COUNTRY.(FIND CAR.ORIGIN.COUNTRY IN CAR|FORMAT=A10).COUNTRY:.QUOTEDSTRING ) OR ( CAR.COMP.CAR EQ &CAR.(FIND CAR.COMP.CAR IN CAR|FORMAT=A16).CAR:.QUOTEDSTRING ); ON TABLE SET PAGE-NUM NOLEAD ON TABLE SET ASNAMES ON ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLEMBEDIMG ON ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/warm.sty, $ ENDSTYLE END
Thank youThis message has been edited. Last edited by: FP Mod Chuck,
Please use the code tag when you include code sample in your post. it help keeping your sample as it should and do not process anything as html component. The code tag is located on the ribbon at far right (the last icon) and looks like this :
</>
Below is doing what you request, but it is missing cases in your scenario such as what if no Country selected but Car is selected ?
-SET &ORDER_BY = IF &CAR EQ _FOC_NULL THEN CAR ELSE COUNTRY;
TABLE FILE CAR
SUM DEALER_COST
RETAIL_COST
BY &ORDER_BY
WHERE ( COUNTRY EQ &COUNTRY.(FIND COUNTRY IN CAR|FORMAT=A10).Country:.QUOTEDSTRING );
WHERE ( CAR EQ &CAR.(FIND CAR IN CAR|FORMAT=A16).Car:.QUOTEDSTRING );
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/warm.sty,
$
ENDSTYLE
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
I tried what you are looking with sample car file ,in this sample i have two filters 1- car 3 country .
If you will select ,
1:-Car , it will show data by car 2:- Country , it will show data by country , 3:- if you will select both car and country or both are missing(All) , it will show data by country and car ,
-SET &ORDER_BY = IF (&CAR NE _FOC_NULL AND &COUNTRY NE _FOC_NULL) OR((&CAR EQ _FOC_NULL AND &COUNTRY EQ _FOC_NULL)) THEN 'COUNTRY BY CAR' ELSE IF (&CAR EQ _FOC_NULL AND &COUNTRY NE _FOC_NULL ) THEN COUNTRY ELSE CAR;
TABLE FILE CAR
SUM
CAR.BODY.DEALER_COST
CAR.BODY.RETAIL_COST
BY &ORDER_BY
WHERE ( CAR.ORIGIN.COUNTRY EQ &COUNTRY.(OR(FIND COUNTRY IN CAR|FORMAT=A10)).Country:. )
AND ( CAR.COMP.CAR EQ &CAR.(OR(FIND CAR IN CAR|FORMAT=A16)).Car:. );
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
$
ENDSTYLE
END