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.
I need to sort the bar chart by HIGHEST .My sample code is :-
TABLE FILE CAR SUM SALES BY HIGHEST TOTAL SALES BY COUNTRY ON TABLE HOLD AS HOLD1 END -**** GRAPH FILE HOLD1 SUM SALES BY HIGHEST E01 NOPRINT BY COUNTRY ON GRAPH SET LOOKGRAPH VBAR ON GRAPH SET 3D OFF ON GRAPH SET GRMERGE ON ON GRAPH SET BARNUMB OFF ON GRAPH SET GRID ON ON GRAPH SET GRAPHEDIT SERVER ON GRAPH SET VZERO ON ON GRAPH SET GRAPHSTYLE * setSeriesType(0,1); setLegendDisplay(true); setLegendMarkerPosition(0); setMarkerDisplay(true); setUseSeriesShapes(false); setConnectLineMarkers(false); setConnectScatterMarkers(false); setO1LabelDisplay(true); setO1AxisSide(0); setO1MajorGridDisplay(true); setO1MajorGridStyle(0); setO1MinorGridDisplay(false); setY1LabelDisplay(false); setY1AxisSide(0); setTextFormatPreset(getY1Label(),1); setY1MajorGridDisplay(true); setY1MajorGridStyle(0); setY1MinorGridDisplay(false); setFontSize(getO1Label(),12); setFontSizeAbsolute(getO1Label(),true); setPlace(true); ENDSTYLE END
The output of this code will give the Y axis value is appended with X axis.Is there any way to display only the X axis like Germany,Japan etc .
Since you can only sort by one thing in GRAPH, you have to fake it out, i.e. sort by a number but display the literal.
Below is the code, a variation of which is posted on this forum. Make sure that you do a search before posting.
And secondly, please check the Friendly Reminders link at the top and update your profile signature with your product suite, release, and platform so that we may better help you.
TABLE FILE CAR
SUM SALES
RANKED BY HIGHEST TOTAL SALES
BY COUNTRY
ON TABLE HOLD AS HOLD1
END
TABLE FILEF HOLD1
PRINT COUNTRY
BY RANK NOPRINT
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SAVE
END
-RUN
-SET &SER_CNT=&LINES;
-SET &I=0;
-* Put all the countries in unique variables.
-REPEAT GRAPH &SER_CNT TIMES
-READ SAVE NOCLOSE &CNAME.A10.
-IF &RETCODE NE 0 GOTO GRAPH;
-SET &I=&I+1;
-SET &CNAME.&I=&CNAME;
-GRAPH
-****
GRAPH FILE HOLD1
PRINT SALES
BY RANK
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET 3D OFF
ON GRAPH SET GRMERGE ON
ON GRAPH SET BARNUMB OFF
ON GRAPH SET GRID ON
ON GRAPH SET GRAPHEDIT SERVER
ON GRAPH SET VZERO ON
ON GRAPH SET GRAPHSTYLE *
setSeriesType(0,1);
setLegendDisplay(true);
setLegendMarkerPosition(0);
setMarkerDisplay(true);
setUseSeriesShapes(false);
setConnectLineMarkers(false);
setConnectScatterMarkers(false);
-* This is where we start the loop to populate the setGroupLabel method once for each series on the graph.
-* Since series numbers are relative to zero, we have to have two counters.
-* &J will count the series. In this case, it will go from 0 to 4.
-* &I will match the index variable name set above. It will go from 1 to 5.
-SET &I=1;
-SET &J=0;
-REPEAT ENDGROUP &SER_CNT TIMES
setGroupLabel(&J,"&CNAME.&I");
-SET &I=&I+1;
-SET &J=&J+1;
-ENDGROUP
setO1LabelDisplay(true);
setO1AxisSide(0);
setO1MajorGridDisplay(true);
setO1MajorGridStyle(0);
setO1MinorGridDisplay(false);
setY1LabelDisplay(false);
setY1AxisSide(0);
setTextFormatPreset(getY1Label(),1);
setY1MajorGridDisplay(true);
setY1MajorGridStyle(0);
setY1MinorGridDisplay(false);
setFontSize(getO1Label(),12);
setFontSizeAbsolute(getO1Label(),true);
setPlace(true);
ENDSTYLE
END
Thanks.It works fine .But in my report I have to show X axis in Mon ,yy format.Example :- Jan ,08 format.I used MtY format in my code but it doesn't work .It displays like 0808 format.
Sample code:-
APP HOLD TESTFOLDER -SET &ECHO = ALL; SQL SQLORA SET SERVER MYDB;
SQL SQLORA SELECT sum(volume) VOL ,tr_date DATE1 FROM TABLE1 WHERE TR_DATE >='01-aug-2008' group by tr_date;
TABLE FILE SQLOUT PRINT VOL DATE1 COMPUTE TRANSDATE/YYMD = HDATE(DATE1, 'YYMD'); TIMELINE/MtY=TRANSDATE; ON TABLE HOLD END
TABLE FILE HOLD SUM VOL BY TIMELINE ON TABLE HOLD AS HD1 FORMAT ALPHA END
GRAPH FILE HD1 SUM VOL BY TIMELINE ON GRAPH SET LOOKGRAPH VBAR ON GRAPH SET 3D OFF ON GRAPH SET BARNUMB OFF ON GRAPH SET GRID ON ON GRAPH SET GRAPHEDIT SERVER ON GRAPH SET GRMERGE ON ON GRAPH SET VZERO OFF ON GRAPH SET VAXIS 230 ON GRAPH SET HAXIS 431 ON GRAPH SET GRAPHSTYLE * -SET &I=1; -SET &J=0; -REPEAT ENDGROUP &SER_CNT TIMES setGroupLabel(&J,"&CNAME.&I"); -SET &I=&I+1; -SET &J=&J+1; -ENDGROUP
Thanks for the solution. Input column,TRANSDATE,is holding the date which of this format,2008/05/01. To convert it to the format, Mon-YY, Iam using this piece of code.
0 ERROR AT OR NEAR LINE 9 IN PROCEDURE SQLOUT FOCEXEC * (FOC257) MISSING QUOTE MARKS: ,'9999,$$9 (FOC009) INCOMPLETE REQUEST STATEMENT BYPASSING TO END OF COMMAND
This is because of the comma that Iam using in the format. I tried some of the escape sequence character (\), but is not working out. Please help.
SQL SQLORA SET SERVER OMNI.PERSHING.COM SQL SQLORA
Select /*+ */COUNT(PROBLEM_MGMT_METRICS_FACT.PROBLEM_ID) AS "metric1" , COUNT(PROBLEM_MGMT_CATEGORY_DIM.PRODUCT_TYPE) AS "metric2" , DATE_DIMENSION.FIRST_DAY_OF_MONTH AS TIMECOL FROM omni_user.PROBLEM_MGMT_METRICS_FACT, omni_user.PROBLEM_MGMT_CATEGORY_DIM, omni_user.DATE_DIMENSION WHERE OMNI_USER.DATE_DIMENSION.FIRST_DAY_OF_MONTH BETWEEN ADD_MONTHS(TRUNC(ADD_MONTHS(TRUNC(SYSDATE,'MM'), -0),'MM'), +1 - 13) AND ADD_MONTHS(TRUNC(SYSDATE,'MM'),-0) AND OMNI_USER.PROBLEM_MGMT_METRICS_FACT.RCA_REMEDY_7_CATEGORY_KEY = OMNI_USER.PROBLEM_MGMT_CATEGORY_DIM.PROBLEM_MGMT_CATEGORY_KEY AND OMNI_USER.PROBLEM_MGMT_METRICS_FACT.DATE_KEY = OMNI_USER.DATE_DIMENSION.DATE_KEY GROUP BY DATE_DIMENSION.FIRST_DAY_OF_MONTH; SQL SQLORA END SESSION;
0 ERROR AT OR NEAR LINE 9 IN PROCEDURE SQLOUT FOCEXEC * (FOC257) MISSING QUOTE MARKS: ,'9999,$$9 (FOC009) INCOMPLETE REQUEST STATEMENT BYPASSING TO END OF COMMAND
Iam trying to convert TIMELINE1 value (say 08/05/01) to the format May,08. If i replace the line COMPUTE TIMELINE/A7=EDIT(CHGDAT('YMD', 'MTYY', EDIT(TIMELINE1), 'A17'),'9999,$$99'); with COMPUTE TIMELINE/A7=EDIT(CHGDAT('YMD', 'MTYY', EDIT(TIMELINE1), 'A17'),'9999,'); Iam getting the TIMELINE value as JAN,FEB,MAR,...But Iam not able to give any character after ,(COMMA)
Please let me know how I can bring this format using EDIT keyword
Thanks for the solution. It works fine. But Iam getting the output in CAPITAL letters like JAN,08 etc., Is there a way to make it in small letters like Jan,08 etc ?
I tried using 'MtYY' instead of 'MTYY' . But that is not working.
Thanks for the solution. It works well. Can you please provide me some link to the documents that has more of the date formats that can be used with the EDIT function ? I need the formats for displaying the dates in the YY-MM,MM-YY,YYYY-MM,MM-YYYY formats. Please let me know if there is any document for the date functions.