Focal Point
Executing a WebFocus report (v7.1.4) on a set time interval

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4161006982

June 27, 2008, 02:54 PM
Denny99
Executing a WebFocus report (v7.1.4) on a set time interval
Hi, I'm trying to develop a report that downloads all the data (based on a given criteria) that occurred during the last 7 days (week). For example, if today is 6/23/08 (Monday) and I want to get all activities that occurred between 6/16/08 (Monday) and the day execute this report which is 6/23/08 (Monday). Is there a function/verb that operates like "LastFullWeek or Last7Days" does in Crystal Reports. Thanks a million!!
June 27, 2008, 02:59 PM
LEX-IA
Dennis,

Is this what you want:

-SET &DATE = '20080623';
-SET &SEVEN_DAYS_AGO = AYMD (&DATE ,-7,'I8');
-TYPE &SEVEN_DAYS_AGO

Cynthia


PROD: WebFOCUS 7.1.0 on Linux/Tomcat 5.5.12 (standalone)/Informix on AIX
TEST: WebFOCUS 7.1.3 on Linux/Tomcat 5.5.16 (standalone)/Informix on AIX
June 27, 2008, 03:23 PM
<Naak>
hi lex-ia,
I trid with u r code. But i did find any out put, still it showing error. Please give some example.
Thanks,
Naak
June 27, 2008, 03:27 PM
LEX-IA
check at the bottom of the html page (the one thats says No HTML Ouput!)
The results of the function is displayed ....


PROD: WebFOCUS 7.1.0 on Linux/Tomcat 5.5.12 (standalone)/Informix on AIX
TEST: WebFOCUS 7.1.3 on Linux/Tomcat 5.5.16 (standalone)/Informix on AIX
June 30, 2008, 09:26 AM
PBrightwell
&DATE is a reserved word, try &MYDATE or &DATE1.


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
June 30, 2008, 09:38 AM
Danny-SRL
Dennis, Naak,

Beware. When you compare a date field to a litteral, both must have the same format. For example if your field is TDATE with format MDYY you must compare it to something like '06/23/2008'.
So what is the format of the date you are using?


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

July 01, 2008, 08:54 AM
PBrightwell
Danny has a good point even after you have used the AYMD to determine 7 days ago, you may have to manipulate the format of the date to be in the same format as your data. If you are using something like Oracle or DB2 you may have to use an HDATE to strip the time off of a timestamp. Various date routines have been covered extensively in this forum. If the AYMD function does not provide what you need, I would suggest you do a search.


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes