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.
-SET &ECHO=ALL; -SET &BEGDATE='19910601'; -SET &ENDDATE='19910612'; -SET &NUMDAYS=DATEDIF(&BEGDATE,&ENDDATE,'D'); -TYPE &NUMDAYS -SET &DAY=0; DEFINE FILE TRAINING COURSEEND/MDYY=COURSESTART+10; BEGDATE/YYMD=&BEGDATE; -REPEAT THISLOOP &NUMDAYS TIMES DAY&DAY/YYMD=DATEADD('&BEGDATE','D',&DAY); DAYCNT&DAY/I9=IF DAY&DAY GE COURSESTART AND DAY&DAY LE COURSEEND THEN 1 ELSE 0; -SET &DAY=&DAY+1; -THISLOOP END TABLE FILE TRAINING SUM -SET &DAY=0; -REPEAT PRINTLOOP &NUMDAYS TIMES DAYCNT&DAY.EVAL AS 'DAY&DAY' -SET &DAY=&DAY+1; -PRINTLOOP END
It would have been helpful if you had mentioned that in your original post.
How about this:
...
TABLE FILE TRAINING
SUM
-SET &DAY=0;
-REPEAT PRINTLOOP &NUMDAYS TIMES
DAYCNT&DAY.EVAL AS 'DAY&DAY'
-SET &DAY=&DAY+1;
-PRINTLOOP
ON TABLE HOLD AS HOLDFORGRAPH
END
GRAPH FILE HOLDFORGRAPH
SUM
...
ON GRAPH SET STYLE
...
END
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
Sry for that. Im very new on Webfocus. Is this graph editable?, because the greatest things were, if i can put some filters in it, so that a dashboard user can set the date range.
I will try it tommorrow, the first tries on building a graph on that today have all been failed, but i have made this directly in info asist.
You can't define the same label more than once in a procedure. Apparently you did. That's what the error says, at least.
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :
at the moment this code produces one value for every day in the computed period.
for testing, i have expand the code to compte more than one value for every day like this:
... DEFINE FILE TRAINING COURSEEND/MDYY=COURSESTART+10; BEGDATE/YYMD=&BEGDATE; -REPEAT THISLOOP &NUMDAYS TIMES DAY&DAY/YYMD=DATEADD('&BEGDATE','D',&DAY); DAYCNT&DAY/I9=IF DAY&DAY GE COURSESTART AND DAY&DAY LE COURSEEND THEN 1 ELSE 0; DAYCNTNEG&DAY/I9=IF DAY&DAY GE COURSESTART AND DAY&DAY LE COURSEEND THEN 0 ELSE 1; -SET &DAY=&DAY+1; -THISLOOP END
TABLE FILE TRAINING -SET &DAY=0; SUM -REPEAT PRINTLOOP &NUMDAYS TIMES DAYCNT&DAY.EVAL AS 'DAY&DAY' DAYCNTNEG&DAY.EVAL AS 'DAY&DAY' -SET &DAY=&DAY+1; -PRINTLOOP END
so i will have a additional complement (only for testing, because later i will have 8 values for every day)
so i get a result like this:
DAY0 | DAY0 |....... 1 |40 |.......
in the graph i will put these 2 values for each day shown on DAY0 on the x axis. But in the moment i am not able to create a graph with a single value..... thats my 1st problem...