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     [CLOSED] Parameter report to scheduel report

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Parameter report to scheduel report
 Login/Join
 
<d3nis370>
posted
I was told to make 4 reports for our different teams ( acct. mtg...)I made each report and had the user enter a specific week range. This report shows what each employee is working on and shows how long they spent on a specific task. Then it adds up the hours and minutes and displays the total. Now the users would like the report to run every Tuesday. The reports should run from the previous week (sun-sat). I know to scheduel the reports in Report Caster but what I am having trouble with is the date parameters. No one will enter the date range so how do I tell the report to run the previous week from Tuesday? Any help is appreciated.

Here is my code for one team. All of the code is the same for the other 3 teams.
 JOIN
 INNER MASTER14.MASTER14.MRID IN MASTER14 TO MULTIPLE
 MASTER14_TIMETRACKING.MASTER14_TIMETRACKING.MRID IN MASTER14_TIMETRACKING
 TAG J0 AS J0
 END
JOIN
 INNER J0.MASTER14_TIMETRACKING.MRTIMEUSER IN MASTER14 TO MULTIPLE
 CM_USERS.CM_USERS.USER_ID IN CM_USERS TAG J1 AS J1
 END
JOIN
 INNER J1.CM_USERS.USER_ID IN MASTER14 TO MULTIPLE
 VPCR_TEAMMEMBERS.VPCR_TEAMMEMBERS.TEAMMEMBER IN VPCR_TEAMMEMBERS TAG J4 AS J4
 END
TABLE FILE MASTER14
SUM
     COMPUTE EnrtyDate/YYMD = HDATE(J0.MASTER14_TIMETRACKING.MRTIMEDATE, 'YYMD'); NOPRINT
BY 'J4.VPCR_TEAMMEMBERS.TEAMNAME' AS 'TEAM NAME'
BY 'J1.CM_USERS.REAL_NAME' AS 'Name'
BY 'J0.MASTER14_TIMETRACKING.MRTIMEDATE' NOPRINT
PRINT
     COMPUTE EDate/MDYY = DATECVT(EnrtyDate, 'YYMD', 'MDYY'); AS 'Entry Date'
     COMPUTE Temp1/A10 = RJUST(10, J0.MASTER14_TIMETRACKING.MRTIMESPENT, Temp1); NOPRINT
     COMPUTE Temp2/A9 = SUBSTR(10, Temp1, 1, 9, 9, Temp2); NOPRINT
     COMPUTE TodaysDate/MDYY = DATEADD(&MDYY, 'D', -14);
     COMPUTE Temp3/D9 = EDIT(Temp2); NOPRINT
     COMPUTE Hours/D9 = INT(Temp3 / 60);
     COMPUTE Minutes/D5 = DMOD(Temp3, 60, Minutes);
     'J0.MASTER14_TIMETRACKING.MRCOMMENT' AS 'Time Entry Comment'
     'J0.MASTER14_TIMETRACKING.MRID' AS 'PCR/IR#'
     'MASTER14.MASTER14.MRTITLE' AS 'Brief Description'
     'J0.MASTER14_TIMETRACKING.MRTIMESPENT' NOPRINT
     COMPUTE EDate/MDYY = DATECVT(EnrtyDate, 'YYMD', 'MDYY'); NOPRINT
BY 'J4.VPCR_TEAMMEMBERS.TEAMNAME' AS 'TEAM NAME'
BY 'J1.CM_USERS.REAL_NAME' AS 'Name'
BY 'J0.MASTER14_TIMETRACKING.MRTIMEDATE' NOPRINT

ON J1.CM_USERS.REAL_NAME SUBTOTAL
     SUM. Temp3 AS 'Total for '
ON J1.CM_USERS.REAL_NAME RECAP
Hrs/D9 = INT(Temp3 / 60);
Mins/D2 = DMOD(Temp3, 60, Mins);
HEADING
"IT ACCT Time Tracking for the time period &BeginDate thru &EndDate"
FOOTING
""
WHERE ( J4.VPCR_TEAMMEMBERS.TEAMNAME IN ('ACCT Team') ) AND ( J0.MASTER14_TIMETRACKING.MRTIMEDATE GE DT(&BeginDate) ) AND ( J0.MASTER14_TIMETRACKING.MRTIMEDATE LT HADD ( DT(&EndDate) , 'DAY' , 1 , 8 , 'HYYMDs' ) );
ON TABLE PCHOLD FORMAT PDF 

This message has been edited. Last edited by: Kerry,
 
Report This Post
Virtuoso
posted Hide Post
Use Dialogue manager to calculate the date range and then use that value as a paramter for your report. Probably would be easiest to get system date, use DATEMOV to move to the beginning of week (BOW) and then DATEADD to subtract one week. Using this technique, a user could run the report at any time during the week and get the data for the previous week.

Specifics for using those funtions are in the online help or "Using Functions" manual.


Regards,

Darin



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, 2007Report This Post
Virtuoso
posted Hide Post
A possible example might be:
DEFINE FILE SYSTABLE
NOW/YYMD = '20101125';
DOW/W = NOW;
LESS/I4 = DECODE DOW(7 1 1 2 2 3 3 4 4 5 5 6 6 7);
ENDDATE/YYMD = NOW - LESS;
STARTDATE/YYMD = ENDDATE - 7;
END

TABLE FILE SYSTABLE
ON TABLE SET PREVIEW ON
SUM FST.STARTDATE FST.ENDDATE 
ON TABLE SAVE
END
-RUN
-READ SAVE &STARTDATE.8. &ENDDATE.8.
-TYPE &STARTDATE = &ENDDATE


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 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     [CLOSED] Parameter report to scheduel report

Copyright © 1996-2020 Information Builders