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.
Hi, I need a report to sum time by two date parameters. I tried to first define the time fields to have the correct format and place it in the file with the sum. It's not working correctly. It works when I do not include the define fields. I gues I'm asking how do I format and display the sum time fields.
-* File v2adhere.fex DEFINE FILE TBLARCH NUMSEC/I4=START; HOUR/I2=(NUMSEC/60); MIN/I2=((NUMSEC/60 - (HOUR *60))); HHMMSS/I6=INT( NUMSEC/3600 ) * 10000 + INT( IMOD(NUMSEC,3600,'I4')/60 ) * 100 + IMOD(NUMSEC,60,'I2'); TIME/A9=IF START LT 0 THEN '-' | EDIT(HHMMSS,'99:99:99') ELSE EDIT(HHMMSS,'99:99:99'); SNUMSEC/I4=STOP; SHOUR/I2=(SNUMSEC/60); SMIN/I2=((SNUMSEC/60 - (SHOUR *60))); SHHMMSS/I6=INT( SNUMSEC/3600 ) * 10000 + INT( IMOD(SNUMSEC,3600,'I4')/60 ) * 100 + IMOD(SNUMSEC,60,'I2'); STIME/A9=IF STOP LT 0 THEN '-' | EDIT(SHHMMSS,'99:99:99') ELSE EDIT(SHHMMSS,'99:99:99'); DNUMSEC/I4=SCHEDULED; DHOUR/I2=(DNUMSEC/60); DMIN/I2=((DNUMSEC/60 - (DHOUR *60))); DHHMMSS/I6=INT( DNUMSEC/3600 ) * 10000 + INT( IMOD(DNUMSEC,3600,'I4')/60 ) * 100 + IMOD(DNUMSEC,60,'I2'); DTIME/A9=EDIT(DHHMMSS,'99:99:99'); END TABLE FILE TBLARCH SUM START STOP SCHEDULED COMPUTE SIGN/D5.1% = ( SIGNED_IN / SCHEDULED ) * 100; AS 'SIGN IN %' COMPUTE COMPPER/D5.1% = ( COMPLIANCE / SCHEDULED ) * 100; AS 'COMPLIANCE %' BY TOTAL HIGHEST COMPUTE COMPPER/D5.1% = ( COMPLIANCE / SCHEDULED ) * 100; NOPRINT BY FULLNAME AS 'NAME' ON TABLE SUBHEAD "Adherence Report" " " "WHERE ( TEAMNAME EQ '&TEAMNAME.(FIND TEAMNAME IN TBLARCH).Please Select Team.' ); WHERE NOM_DATE GE '&dte' AND NOM_DATE LE '&edte'; ON TABLE SET PAGE-NUM OFF ON TABLE SUMMARIZE TBLARCH.TBLARCH.START TBLARCH.TBLARCH.STOP TBLARCH.TBLARCH.SCHEDULED SIGN COMPPER AS 'ROLL-UP' ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * end
I guess you are trying to add some time data together to give a total time expended value? e.g. 3 hrs 25 mins 35 secs + 4 hrs 42 mins 15 secs = 8 hrs 7 mins and 50 secs.
If this is the case then you would be better off getting the time values into seconds, producing the sum and then converting into HH:MM:SS maybe?
OR, is the data you are using an intimation of the start seconds and the stop seconds?
If this is the case then you are probably close to your goal but you will have problems. This is because within your define you are trying to perform an EDIT mask on integer data. To do this you would have to do a "double EDIT" e.g EDIT(EDIT(integerfield),'99:99:99'). The "inner" EDIT tranforms the integer field to an alpha equivalent, the "outer" EDIT applies the mask.
If it is neither of these two possibilities then please explain clearly - as Alan suggest - using one of the sample files.
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
I'm sorry. I'm trying to format time that is summed through a date parameter query. The raw data for the time field is already in seconds. The define fields I created does provide the correct format I need. What I want to do, is display the time format's new defined field when the report is queried for a specific data range instead of the actual field which is in seconds. It took alot of define coding to get it to the way I want it to display. In MS Access, this can be done very easily through the expression builder. Any Ideas?
Thanks, I tried something similar. It only shows the format for the first date. I was thinking of using a stored procedure from sql server. I can get it to work through the autoparameter form, however when I link it to an html form it does not work error (FOC205 THE DESCRIPTION CANNOT BE FOUND FOR SQLOUT AND THE DUMP FILE...)CODE BELOW:
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007