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.
The across column is based on a defined field. Whose code is this.
IF QUARTER_ID EQ 1 THEN '1st Quarter' ELSE IF QUARTER_ID EQ 2 THEN '2nd Quarter' ELSE IF QUARTER_ID EQ 3 THEN '3rd Quarter' ELSE IF QUARTER_ID EQ 4 THEN '4th Quarter' ELSE ' ';
No matter what I do, the axis labels after '1' come as 'Group 1', 'Group 2', 'Group 3'. I want them as per the above code.
Please suggest a solution. Extremely urgent. Thank you in advance!This message has been edited. Last edited by: Tamra,
WebFocus 8.1 Service Pack 0.5 Build Version branch8105 Build/GEN Number 119
OS/Platform: Apache Tomcat/8.0.21
Posts: 46 | Location: Baltimore | Registered: October 27, 2016
Thank you for your response Martin! Here is the code.
ENGINE SQLORA SET DEFAULT_CONNECTION TADMINTEST
SQL SQLORA PREPARE SQLOUT FOR
SELECT
YEAR_ID ,
QUARTER_ID,
STATUS,
SUM(COM_1) COM_1 ,
SUM(COM_2) COM_2,
ROUND(( SUM(COM_2)/SUM(COM_1)) * 100, 0) PCT
FROM (
SELECT AGENCY , YEAR_ID , QUARTER_ID, STATUS, SUM(ACTUAL_VALUE) COM_1 , +0 COM_2
FROM DRTADMIN.VW_RPT_DRT_COMP_DATA
WHERE COMPONENT_ID = 1
GROUP BY
COMPONENT_ID ,
AGENCY ,
YEAR_ID ,
QUARTER_ID,
STATUS
UNION ALL
SELECT AGENCY , YEAR_ID , QUARTER_ID, STATUS,+0 COM_1 , SUM(ACTUAL_VALUE) COM_2
FROM DRTADMIN.VW_RPT_DRT_COMP_DATA
WHERE COMPONENT_ID = 2
GROUP BY
COMPONENT_ID ,
AGENCY ,
YEAR_ID ,
QUARTER_ID,STATUS)
GROUP BY
YEAR_ID ,
QUARTER_ID,
STATUS
ORDER BY
YEAR_ID ,
QUARTER_ID;
END
DEFINE FILE SQLOUT ADD
CF_YEAR/I4=YEAR_ID;
CF_YEAR_A/A22=FTOA( YEAR_ID , '(D20.2)', 'A22');
CS_NOCOMMAS/A22=STRIP(22, CF_YEAR_A, ',', CS_NOCOMMAS);
SUBSTR_CS_NOCOMMAS/A5=SUBSTR(22, CS_NOCOMMAS, 18, 22, 4, 'A5');
CONT_YR/A20='FY' | ' ' | SUBSTR_CS_NOCOMMAS;
CF_QTR_NAMES/A11=IF QUARTER_ID EQ 1 THEN '1st Quarter' ELSE IF QUARTER_ID EQ 2 THEN '2nd Quarter' ELSE IF QUARTER_ID EQ 3 THEN '3rd Quarter' ELSE IF QUARTER_ID EQ 4 THEN '4th Quarter' ELSE '5th Quarter';
CURRENTDATE/A10=TODAY(CURRENTDATE);
CURRENTFY/A4=SUBSTR(10, CURRENTDATE, 7, 10, 4, CURRENTFY);
CURRENTFM/A4=SUBSTR(10, CURRENTDATE, 1, 2, 4, CURRENTFM);
CURRENTFYINT/I4=EDIT(CURRENTFY);
CURRENTFMINT/I4=EDIT(CURRENTFM);
CURRENTFYINT1/I4=IF (CURRENTFMINT GE 1) AND (CURRENTFMINT LE 6) THEN CURRENTFYINT ELSE CURRENTFYINT + 1;
LAST5FYINT/I4=CURRENTFYINT1 - 4;
LAST4FYINT/I4=CURRENTFYINT1 - 4;
LAST3FYINT/I4=CURRENTFYINT1 - 3;
LAST2FYINT/I4=CURRENTFYINT1 - 2;
LAST1FYINT/I4=CURRENTFYINT1 - 1;
END
-*IA_GRAPH_BEGIN
-*Do not delete or mod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iZW5hYmxlUHJldmlldyIgdHlwZT0iamF2YS5sYW5nLkJvb2xlYW4iPnRydWU8L1Byb3BlcnR5Pg0KICAgIDwvT2JqZWN0Pg0KPC9Sb290Pg0K
-*Do not delete or modify the comments above
ENGINE INT CACHE SET ON
-DEFAULTH &WF_STYLE_UNITS='PIXELS';
-DEFAULTH &WF_STYLE_HEIGHT='405.0';
-DEFAULTH &WF_STYLE_WIDTH='770.0';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
GRAPH FILE SQLOUT
-* Created by Info Assist for Graph
PRINT SQLOUT.SQLOUT.PCT AS 'Percent of Budget Expended'
BY SQLOUT.SQLOUT.CONT_YR AS '" "'
ACROSS SQLOUT.SQLOUT.CF_QTR_NAMES
WHERE SQLOUT.SQLOUT.COM_1 NE 0 AND SQLOUT.SQLOUT.COM_2 NE 0;
WHERE SQLOUT.SQLOUT.STATUS EQ '&STATUS_ID.(<1>,<2>,<3>,<4>,<5>,<6>,<7>,<8>,<9>,<10>,<11>,<12>,<13> |FORMAT=D20.2).Status ID.';
WHERE SQLOUT.SQLOUT.CF_YEAR GE LAST5FYINT;
WHERE SQLOUT.SQLOUT.CF_YEAR LE CURRENTFYINT;
HEADING
"5 Yr Capital Program Expenditure Rate Trend Line - State & Federal"
" "
" "
ON GRAPH PCHOLD FORMAT PNG
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET EMBEDHEADING ON
ON GRAPH SET UNITS &WF_STYLE_UNITS
ON GRAPH SET HAXIS &WF_STYLE_WIDTH
ON GRAPH SET VAXIS &WF_STYLE_HEIGHT
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 1
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET STYLE *
*GRAPH_SCRIPT
setPieDepth(0);
setPieTilt(0);
setDepthRadius(0);
setCurveFitEquationDisplay(false);
setPlace(true);
setUseSeriesShapes(true);
setMarkerSizeDefault(50);
*END
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, $
TYPE=HEADING, JUSTIFY=CENTER, FONT='ARIAL', SIZE=12, COLOR=RGB(185 0 0), STYLE=BOLD, $
*GRAPH_SCRIPT
setReportParsingErrors(false);
setSelectionEnableMove(false);
setDisplay(getO1MajorTick(),true);
setTickStyle(getO1MajorTick(),3);
setAltFmtFrameNumColors(getO1AltFmtFrame(),5);
setTextFormatPreset(getY1Label(),28);
setFontName(getY1Title(),"ARIAL");
setFontName(getO1Label(),"ARIAL");
setFontStyle(getO1Label(),2);
setDisplay(getO1Title(),false);
setLegendPosition(1);
setFontName(getY1Label(),"ARIAL");
setFontStyle(getY1Label(),2);
setDisplay(getY1MajorTick(),true);
setTickStyle(getY1MajorTick(),3);
setAltFmtFrameNumColors(getY1AltFmtFrame(),5);
setFillColor(getFrame(),new Color(255,255,255));
setFontSizeAbsolute(getO1Label(), true);
setFontSizeInPoints(getO1Label(), 9);
setPlaceResize(getO1Label(), 0);
setFontSizeAbsolute(getY1Label(), true);
setFontSizeInPoints(getY1Label(), 9);
setPlaceResize(getY1Label(), 0);
setFontSizeAbsolute(getY1Title(), true);
setFontSizeInPoints(getY1Title(), 9);
setPlaceResize(getY1Title(), 0);
setFontName(getLegendText(),"ARIAL");
setFontStyle(getLegendText(),2);
setFillColor(getSeries(0),new Color(255,204,204));
setSeriesType(0,2);
setMarkerShape(getAllSeries(),2);
setTextString(getY1Title(),"Percent of Budget Expended");
setDisplay(getY1Title(),true);
setDisplay(getO1MinorTick(),true);
setTickStyle(getO1MinorTick(),3);
setFontName(getO1AltFmtLabel(0),"ARIAL");
setFontStyle(getO1AltFmtLabel(0),2);
setDisplay(getO1MinorGrid(),true);
setGridStyle(getO1MinorGrid(),3);
setBorderColor(getO1MajorGrid(),new Color(13,13,13));
setFillColor(getO1MajorGrid(),new Color(13,13,13));
setDisplay(getO1MajorGrid(),false);
*END
ENDSTYLE
END
-RUN
-*IA_GRAPH_FINISH
-* File: IBFS:/DRT/WFC/Repository/DRT/Standard_Reports/SD/2_1/Procedure1.fex Created by WebFOCUS AppStudio
WebFocus 8.1 Service Pack 0.5 Build Version branch8105 Build/GEN Number 119
OS/Platform: Apache Tomcat/8.0.21
Posts: 46 | Location: Baltimore | Registered: October 27, 2016
Sandeep,have you tried holding the results of SQLOUT and then create the graph. I've had to do this when using SQLOUT directly and the output was not as expected. The graph stays the same but uses the hold file in place of SQLOUT.
Greg
current client: WF 8.1.05 & 8.2 - Windows 7 64bit - Tomcat 7 - MRE / BID - IE11
You can create a temporary file, HOLD file, from a TABLE FILE request. This can also be done in the Report GUI using the Output Format tab, Unformatted file format.
TABLE FILE CAR SUM SALES BY COUNTRY ON TABLE HOLD AS 'MYHOLD' END
GRAPH FILE MYHOLD SUM SALES ACROSS COUNTRY END
Greg
current client: WF 8.1.05 & 8.2 - Windows 7 64bit - Tomcat 7 - MRE / BID - IE11
Ok, so it's Christmas and the last working day for me, so here's a little example that mimics your situation. The first part purely extracts some data to give me something to show an SQL section. Hopefully you get the point of what Greg suggested from what follows that SQL.
I would echo what Tamra has said about taking education classes though, you will benefit greatly and so will your company!!
Anyway, Merry Christmas!
DEFINE FILE GGORDER
YEAR/YY = ORDER_DATE;
QUARTER/Q = ORDER_DATE;
VALUE1/D12.2 = (QUANTITY - (RDNORM('D12.2') * 900)) * UNIT_PRICE;
VALUE2/D12.2 = QUANTITY * UNIT_PRICE;
END
TABLE FILE GGORDER
PRINT VALUE1
VALUE2
BY YEAR
BY QUARTER
BY PRODUCT_ID
BY VENDOR_NAME
WHERE YEAR IN (1996,1997)
ON TABLE HOLD AS TEMPHLD1 FORMAT FOCUS
END
-RUN
-* This mimics your SQL passthru
SQL
select year
, quarter
, sum(value1) as value1
, sum(value2) as value2
, (sum(value1) / sum(value2) * 100) as pct
from temphld1
group by year
, quarter
;
TABLE
ON TABLE HOLD AS TEMPHLD1
END
-RUN
DEFINE FILE TEMPHLD1
CF_YEAR/I4 = YEAR;
CF_YEAR_A/A22 = FTOA( YEAR , '(D20.2)', 'A22');
CS_NOCOMMAS/A22 = STRIP(22, CF_YEAR_A, ',', CS_NOCOMMAS);
SUBSTR_CS_NOCOMMAS/A5 = SUBSTR(22, CS_NOCOMMAS, 18, 22, 4, 'A5');
CONT_YR/A20 = 'FY' | ' ' | SUBSTR_CS_NOCOMMAS;
CF_QTR_NAMES/A11 = IF QUARTER EQ 1 THEN '1st Quarter' ELSE IF QUARTER EQ 2 THEN '2nd Quarter' ELSE IF QUARTER EQ 3 THEN '3rd Quarter' ELSE IF QUARTER EQ 4 THEN '4th Quarter' ELSE '5th Quarter';
END
ENGINE INT CACHE SET ON
GRAPH FILE TEMPHLD1
SUM PCT AS 'Percent of Budget Expended'
BY CONT_YR AS '" "'
ACROSS CF_QTR_NAMES
WHERE VALUE1 NE 0 AND VALUE2 NE 0;
HEADING
"5 Yr Capital Program Expenditure Rate Trend Line - State & Federal"
" "
" "
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET VZERO OFF
ON GRAPH SET HTMLENCODE ON
ON GRAPH SET GRAPHDEFAULT OFF
ON GRAPH SET GRWIDTH 1
ON GRAPH SET EMBEDHEADING ON
ON GRAPH SET GRMERGE ADVANCED
ON GRAPH SET GRMULTIGRAPH 0
ON GRAPH SET GRLEGEND 1
ON GRAPH SET GRXAXIS 1
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET STYLE *
etc. etc. etc.
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004