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.
hope someone can enlighten me with this. Ive had a search around & havent been able to find anything that sorts it out.
Im creating a graph which currently uses a DMYY field as the across option. What I want to do is only show the DM portion of the date. I know I could change this to alphanumeric but this then moves columns which have a lower DAY value to the front of the graph.
(note UK date format)
i.e 02/05 then 22/04 then 29/04
should be
22/04 then 29/04 then 02/05
I did look at doing the ALPHA format as MD to correct this issue but those requesting the data dont want to see it like this. I also tried poutting 2 across statements in but, as I thought, the graph option doesnt like it.
Im hoping Im missing something simple here after the bank holiday.
cheers
wf server & dev studio 714 testing server & dev studio 765This message has been edited. Last edited by: Kerry,
81.05 All formats
Posts: 56 | Location: Manchester | Registered: November 21, 2006
The only way you can isolate Day-Month and keep the correct order is by using DateTime format. See the following example with the CAR file. I produced a fictitious date in order to test.
DEFINE FILE CAR
PROD/YYMD=
63* 365 + LENGTH * 10 + HEIGHT * 10 + WIDTH * 10;
PA/A8YYMD=PROD;
PB/A17=PA;
HPA/HYYMD=HINPUT(17, PB, 8, HPA);
DMPROD/HDM=HPA;
END
GRAPH FILE CAR
SUM SALES
ACROSS DMPROD
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006
There was this topic that discussed exactly what you need, however it wasn't going to be as easy as we would all have liked.
The ideal approach, of course, would be -
DEFINE FILE GGSALES
DATE_YMD/A8 = EDIT(DATE);
DMONTH/A6 = CHGDAT('YYMD','DMX',DATE_YMD,'A6');
END
GRAPH FILE GGSALES
SUM DOLLARS
ACROSS DATE NOPRINT
ACROSS DMONTH
WHERE DATE FROM '19960101' TO '19961231'
END
But as we all know, the use of NOPRINT isn't supported in graphs, so you'll either have to accept Danny's suggestion or the detail within the link above or get clever with the data.
You might be able to do a pre-extract of the labels you want and then put them into thr API code using -INCLUDE at the setGroupLabelArray(}; point. I had a quick look at this but didn't get very far in short time but you might be able to run with it.
APP PREPENDPATH IBISAMP
FILEDEF LABELS DISK LABELS.FEX
-RUN
DEFINE FILE GGSALES
DATE_YMD/A8 = EDIT(DATE);
DMONTH/A8 = '"'||CHGDAT('YYMD','DMX',DATE_YMD,'A6')||'"';
END
TABLE FILE GGSALES
SUM DMONTH
COMPUTE COMMA/A1 = IF DATE GT '19961130' THEN '' ELSE ',';
BY DATE NOPRINT
WHERE DATE FROM '19960101' TO '19961231'
ON TABLE SAVE AS LABELS
END
-RUN
GRAPH FILE GGSALES
SUM DOLLARS
ACROSS DATE NOPRINT
WHERE DATE FROM '19960101' TO '19961231'
ON GRAPH SET GRAPHEDIT OFF
ON TABLE SET GRAPHSTYLE *
setGroupLabelArray(
-INCLUDE LABELS.FEX
);
ENDSTYLE
END
If you get it to work then please post your solution because this is something lots of folks have tried but never managed
Helps if I get the syntax right of course!! The above works for me.
TThis message has been edited. Last edited by: Tony A,
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
APP PREPENDPATH IBISAMP
FILEDEF LABELS DISK LABELS.FEX
-RUN
DEFINE FILE GGSALES
DATE_YMD/A8 = EDIT(DATE);
DMONTH/A8 = '"'||CHGDAT('YYMD','DMX',DATE_YMD,'A6')||'"';
END
TABLE FILE GGSALES
SUM DMONTH
COMPUTE COMMA/A1 = IF DATE GT '19970531' THEN '' ELSE ',';
BY DATE NOPRINT
WHERE DATE FROM '19960601' TO '19970531'
ON TABLE SAVE AS LABELS
END
-RUN
GRAPH FILE GGSALES
SUM DOLLARS
ACROSS DATE
WHERE DATE FROM '19960601' TO '19970531'
ON GRAPH SET GRAPHEDIT OFF
ON TABLE SET GRAPHSTYLE *
setGroupLabelArray(
-INCLUDE LABELS.FEX
);
ENDSTYLE
END
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
Thats great tony, got it working - just need to pull it apart to understand the function now. havent done much with graphs at all, this is a totally new ball game to me.
81.05 All formats
Posts: 56 | Location: Manchester | Registered: November 21, 2006
I must admit that I didn't try your code and I was working on the assumption (incorrectly?) that PBax's Users wanted Month Name in the label - most users would if they could - but yes, H-type dates win the day again.
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
dragging this one back up again. using the grouparray feature was a new one on me. Im now required to add another graph within the same compund pdf report. Howvere this time that array is based upon defined labels rather than date (i.e 1 week, 1 month, 3 months) try as I might I cant get the procedure to overwrite on the fly the labels.fex array nor allocate another one.
Are there any issues in using 2 arrays within one procedure? If anyone could help Id really appreciate it. I can go into more detail but thought id get my initial problem down first.
many thanks
81.05 All formats
Posts: 56 | Location: Manchester | Registered: November 21, 2006