Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Graph Label - setting label through a & variable

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Graph Label - setting label through a & variable
 Login/Join
 
Gold member
posted
Does anyone know how to set a graph label using a & variable.

My problem is that on the across I have a field which has the month in numeric format (i.e 01, 02 ...) the month 01 can be January, February, March .... depending on the end month which the user provides. When I created my FML report this was easy since I used the & variable in the AS phrase but I can't see how to use this when I produce a Graph.

Thank you for your help


WebFocus 7.6.6
Oracle 10
Windows XP
 
Posts: 60 | Registered: March 13, 2007Report This Post
Virtuoso
posted Hide Post
Jay

Would you be so kind to post a part of your code as an example?
That might make your question better to understand and gives the opportunity to give better help.

btw what version are you using?




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, 2006Report This Post
Gold member
posted Hide Post
4
3
2
1
June July August
01 02 03

As you can see from above June is related to month 01 June to 02 this can change depending on the month the user enters . I created set statements to set the month01 to June month02 to July base if they enter the month of May.

SET LOOKGRAPH=BAR
SET GRID = ON
-* SET LOOKGRAPH=BAR
-* SET HAXIS = 985
-* SET VAXIS = 518
GRAPH FILE HLDXCMPL
SUM YR1_COUNT AS '&YR1'
YR2_COUNT AS '&YR2'
YR3_COUNT AS '&YR3'
ACROSS REC_COUNT
ON GRAPH SET GRAPHSTYLE *
setDataLabel(0,0, ?My New Group 0 Label?);
setGroupLabel(0,getDataLabel(0,0));
setDepthRadius(1);
setLegendMarkerPosition(4);
setO1LabelRotate(1);
setTitleString("Ridership Report");
setTextJustHoriz(getTitle(),1);
ENDSTYLE
END
You see the rec_count and i need to be printed in order 1,2,3 .... 12 but I need the month name (i.e april) instead of 1.

I'm using 7.1.3 of focus

Would going to 7.6.1 on the client help ?

Would you be so kind to post a part of your code as an example?
That might make your question better to understand and gives the opportunity to give better help.

btw what version are you using?[/QUOTE]


WebFocus 7.6.6
Oracle 10
Windows XP
 
Posts: 60 | Registered: March 13, 2007Report This Post
Master
posted Hide Post
Try this piece of code,

-CONTRDSL
-READ SECDIMDAT &SECDIMVAL.A&SECDIMLEN.EVAL.
-SET &SECDIMVAL1=DECODE &SECDIMVAL('01' 'JAN' '02' 'FEB' '03' 'MAR'
- '04' 'APR' '05' 'MAY' '06' 'JUN' '07' 'JUL' '08' 'AUG'
- '09' 'SEP' '10' 'OCT' '11' 'NOV' '12' 'DEC');
-SKPDCMON
-IF &IORETURN NE 0 THEN GOTO ENDRDSL;
setSeriesLabel(&CNT,"&SECDIMVAL1");
-SET &CNT=&CNT+1;
-GOTO CONTRDSL;
-ENDRDSL

Hope this helps,


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
Gold member
posted Hide Post
Can you please explain your code - I need to understand so I can fit your code into my code - thank you
Try this piece of code,

-CONTRDSL
-READ SECDIMDAT &SECDIMVAL.A&SECDIMLEN.EVAL.
-SET &SECDIMVAL1=DECODE &SECDIMVAL('01' 'JAN' '02' 'FEB' '03' 'MAR'
- '04' 'APR' '05' 'MAY' '06' 'JUN' '07' 'JUL' '08' 'AUG'
- '09' 'SEP' '10' 'OCT' '11' 'NOV' '12' 'DEC');
-SKPDCMON
-IF &IORETURN NE 0 THEN GOTO ENDRDSL;
setSeriesLabel(&CNT,"&SECDIMVAL1");
-SET &CNT=&CNT+1;
-GOTO CONTRDSL;
-ENDRDSL

Hope this helps,[/QUOTE]


WebFocus 7.6.6
Oracle 10
Windows XP
 
Posts: 60 | Registered: March 13, 2007Report This Post
Master
posted Hide Post
Sorry the piece of code I sent to you before wont work.

Try this code,

To test this, create MONTH.txt file and that has to have the values like
JAN
FEB
..
..
DEC

Store this file under your apps directory and call that file in your fex.

-*SET &ECHO='ALL';

FILEDEF MONTHDAT DISK \\&servname\IBI\APPS\MONTH.TXT
-RUN

-**input
-SET &MON1='JUN';
-*changing the input corresponding to month.
-SET &SELMONTH=DECODE &MON1('JAN' '0' 'FEB' '1' 'MAR' '2' 'APR' '3' 'MAY' '4'
- 'JUN' '5' 'JUL' '6' 'AUG' '7' 'SEP' '8' 'OCT' '9' 'NOV' '10' 'DEC' '11');

-SET &STARTMON = 12 - EDIT(&SELMONTH);
-SET &CNT=0;
-SET &MONVAL='';

-CONTRD
-READ MONTHDAT &MON.A3
-IF &IORETURN NE 0 THEN GOTO ENDRD ELSE GOTO GETMON;
-GETMON
-IF &MON EQ &MON1 OR &CNT GT 0 THEN GOTO STARTONE ELSE GOTO STARTTWO;
-STARTONE
-SET &MONVAL&CNT.EVAL=&MON ;
-SET &CNT=&CNT+1;
-GOTO CONTRD;

-STARTTWO
-SET &MONVAL&STARTMON.EVAL=&MON;
-SET &STARTMON=&STARTMON+1;
-GOTO CONTRD;
-ENDRD

-SET &CNT=0;
-REPEAT MONVAL 12 TIMES
-TYPE &MONVAL&CNT.EVAL
-SET &CNT=&CNT+1;
-MONVAL
-EXIT

Run this code and you will get some idea.

If you want to put this code in to your program. All you have to do is,

your code

FILEDEF MONTHDAT DISK C:\WEBFOCUS71\IBI\APPS\MONTH.TXT
-RUN

-SET &MON1='JUN';
-SET &SELMONTH=DECODE &MON1('JAN' '0' 'FEB' '1' 'MAR' '2' 'APR' '3' 'MAY' '4'
- 'JUN' '5' 'JUL' '6' 'AUG' '7' 'SEP' '8' 'OCT' '9' 'NOV' '10' 'DEC' '11');
-SET &STARTMON = 12 - EDIT(&SELMONTH);
-SET &CNT=0;
-SET &MONVAL='';

-CONTRD
-READ MONTHDAT &MON.A3
-IF &IORETURN NE 0 THEN GOTO ENDRD ELSE GOTO GETMON;
-GETMON
-IF &MON EQ &MON1 OR &CNT GT 0 THEN GOTO STARTONE ELSE GOTO STARTTWO;
-STARTONE
-SET &MONVAL&CNT.EVAL=&MON ;
-SET &CNT=&CNT+1;
-GOTO CONTRD;

-STARTTWO
-SET &MONVAL&STARTMON.EVAL=&MON;
-SET &STARTMON=&STARTMON+1;
-GOTO CONTRD;

-ENDRD

SET LOOKGRAPH=BAR
SET GRID = ON
-* SET LOOKGRAPH=BAR
-* SET HAXIS = 985
-* SET VAXIS = 518
GRAPH FILE HLDXCMPL
SUM YR1_COUNT AS '&YR1'
YR2_COUNT AS '&YR2'
YR3_COUNT AS '&YR3'
ACROSS REC_COUNT
ON GRAPH SET GRAPHSTYLE *
setDataLabel(0,0, ?My New Group 0 Label?);
setGroupLabel(0,getDataLabel(0,0));
setDepthRadius(1);
setLegendMarkerPosition(4);
setO1LabelRotate(1);
setTitleString("Ridership Report");
setTextJustHoriz(getTitle(),1);

-SET &CNT=0;
-REPEAT MONVAL 12 TIMES
-*TYPE &MONVAL&CNT.EVAL
setSeriesLabel(&CNT,&MONVAL&CNT.EVAL)
-SET &CNT=&CNT+1;
-MONVAL
ENDSTYLE
END


Hope this helps,


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
Gold member
posted Hide Post
-MAY
-SET &MONTH08 = 'January';
-SET &MONTH09 = 'Febuary';
-SET &MONTH10 = 'March';
-SET &MONTH11 = 'April';
-SET &MONTH12 = 'May';
-SET &MONTH01 = 'June';
-SET &MONTH02 = 'July';
-SET &MONTH03 = 'August';
-SET &MONTH04 = 'September';
-SET &MONTH05 = 'October';
-SET &MONTH06 = 'November';
-SET &MONTH07 = 'December';
-GOTO CONTINUE

setGroupLabel(0, "&MONTH01");
setGroupLabel(1, "&MONTH02");
setGroupLabel(2, "&MONTH03");
setGroupLabel(3, "&MONTH04");
setGroupLabel(4, "&MONTH05");
setGroupLabel(5, "&MONTH06");
setGroupLabel(6, "&MONTH07");
setGroupLabel(7, "&MONTH08");
setGroupLabel(8, "&MONTH09");
setGroupLabel(9, "&MONTH10");
setGroupLabel(10, "&MONTH11");
setGroupLabel(11, "&MONTH12");

at first you set up the & variables - then you can take the & varable and set it in the setGroupLabel - thats it - thank you for your help


WebFocus 7.6.6
Oracle 10
Windows XP
 
Posts: 60 | Registered: March 13, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Graph Label - setting label through a & variable

Copyright © 1996-2020 Information Builders