Focal Point
[SOLVED] How to capture weekends and holidays on a report that run M thru F?

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

January 26, 2010, 10:50 AM
Latigresa
[SOLVED] How to capture weekends and holidays on a report that run M thru F?
Our users get a report that run Monday through Friday after batch on the following day. At the moment this report only captures these 5 days. Now the users want to see what happens on the weekends and holidays. They want the Tuesday report to show what happen on the weekend on this day only. How do I go about capturing 3 days on this report for Tuesday's run while the same report runs for only one day the rest of the week? HELP HELP!! I have no clue where to even start on this. Any and all help is greatly appreciated. Thank you in advance. :-)

This message has been edited. Last edited by: Kerry,


WEBFOCUS 7.6.4
Server: WINXP
January 26, 2010, 11:04 AM
Glenda
So let me see if I understand:

Mondays report contains Fridays data
Tuesdays report contains Sat, Sun & Mondays data
Wednesdays report contains Tuesdays data
Thursdays report contains Wednesdays data
Fridays report contains Thursdays data

Is this correct?


Glenda

In FOCUS Since 1990
Production 8.2 Windows
January 26, 2010, 11:27 AM
Latigresa
Yes Ma'am. Exactly! :-)


WEBFOCUS 7.6.4
Server: WINXP
January 26, 2010, 11:32 AM
Glenda
Try this:

 
-SET &&INCLUDE      = '-INCLUDE';
-SET &W1            = DOWK((&YYMD+0), '');
-SET &DOFRDT        = DECODE &W1 (MON 'AYMD(&YYMD, -3, ''I8YYMD'')'
-                                 TUE 'AYMD(&YYMD, -3, ''I8YYMD'')'
-                                ELSE 'AYMD(&YYMD, -1, ''I8YYMD'')');
-SET &FRDT          = &DOFRDT.EVAL;
-SET &DOTODT        = DECODE &W1 (MON 'AYMD(&YYMD, -3, ''I8YYMD'')'
-                                ELSE 'AYMD(&YYMD, -1, ''I8YYMD'')');
-SET &TODT          = &DOTODT.EVAL;


THEN YOUR WHERE CLAUSE WOULD BE:

WHERE DATEFIELD GE &FRDT.EVAL
WHERE DATEFIELD LE &TODT.EVAL



Glenda

In FOCUS Since 1990
Production 8.2 Windows
January 26, 2010, 11:57 AM
Latigresa
Thank you Glenda! I will try this once they have something for me to test with. I called to get a test date and there are no polocies currently in the region I'm testing that fall on the weekend. It will be a few days before I know if I understood your code correct or not. :-( But as soon as I find out I will post my results. Thanks again!!!


WEBFOCUS 7.6.4
Server: WINXP
February 02, 2010, 10:59 AM
Latigresa
Thanks I was able to get this done. I went with holding the date the report is last run then reading the crrent date and it bringing back everything between the last time it ran and the current date. This way I will also capture holidays alnog with the weekends.

Thanks for all the help!


WEBFOCUS 7.6.4
Server: WINXP