Focal Point
[CLOSED] Report Run on First Saturday of the Month

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

December 12, 2012, 07:54 AM
Deepu
[CLOSED] Report Run on First Saturday of the Month
Hi

In table every day the data is loading and load time stamp is field is updating time in table based on this load time stamp i need to retrive the data .

I have requirements like this

this report should include a full month( previous month data on it) should run the second Friday of the month,

please can any one help me how to do

Thanks
Smiler

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


WebFOCUS 7.6
Windows, All Outputs
December 12, 2012, 10:21 AM
RSquared
Create a Report Caster schedule and select
Month and then select 2nd Friday


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
December 12, 2012, 11:47 AM
Deepu
Hi
we are not using Report Caster

if Report runs on "First Saturday of the every Month" (Reports Running manually) Reports need to show the data previous month to before This date First Saturday of the every Month"

In table every day the data is loading and load time stamp is field is updating time in table based on this load time stamp

Note:based on this load time stamp field in table i need to pull the data.

Thanks

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


WebFOCUS 7.6
Windows, All Outputs
December 12, 2012, 12:01 PM
nd
Do you need help with a filter in the report? E.g. select items with a time stamp from the beginning of the previous month through the second friday of the defined month?

Or, ALL of last month (as indicated by load time stamp) becomes available as of the second Friday of the subsequent month?


WF: WebFocus 7.7.03
Data: Oracle, MSSQL, DB2
OS: Windows
Output: HTML/AHTML,PDF,EXL2K FORMULA, COMT
December 12, 2012, 06:41 PM
Dan Satchell
This Dialogue Manager code will determine the beginning and ending dates of the previous month, based on today's date (&YYMD).

-SET &CUR_YR_MTH  = EDIT(&YYMD,'999999$$');
-SET &CUR_MTH_BEG = &CUR_YR_MTH | '01';
-SET &RPT_YR_MTH  = AYM(&CUR_YR_MTH,-1,'I6');
-SET &RPT_MTH_BEG = &RPT_YR_MTH | '01';
-SET &RPT_MTH_END = AYMD(&CUR_MTH_BEG,-1,'I8');

You can then use these beginning and ending date variables to filter your data (example below). I am making the assumption that your load time stamp has a date-time format. Function HDATE will extract the date portion. If this is not the case, then another approach may be necessary to extract the dates from your load time stamps.

DEFINE FILE xxx
 LOAD_DATE/YYMD = HDATE(load time stamp,'YYMD');
END
-*
TABLE FILE xxx
SUM/PRINT xxx
BY xxx
WHERE (LOAD_DATE FROM '&RPT_MTH_BEG' TO '&RPT_MTH_END');
END



WebFOCUS 7.7.05
December 13, 2012, 03:11 AM
Ahamed Thaha
If you are not using Report Caster, you need to write a batch program (Report.cmd) similar to below to call a t3i(Call_fex.t3i) file:

----------------Start batch------------------------

rem Report.cmd

set WFSHOME=C:\ibi\64bit\srv76\wfs\bin
set T3IDIR=E:\input\t3i
cd\
e:
cd %T3IDIR%
call %WFSHOME%\edastart -f %T3IDIR%\Call_fex

----------------End batch--------------------------


The code for Call_fex.t3i will look similar to below, This t3i will call the LOAD_DATA.fex:

----------------Start t3i--------------------------

-* Module name : Call_fex.t3i


%CONNECT
%BEGIN

EX LOAD_DATA

%END
%DISCONNECT
%STOP_SERVER

----------------End t3i----------------------------

The below fex will call the generate_report.fex only on first Saturday of every month and your logic to fetch data should be in the include fex (generate_report.fex)

----------------Start fex--------------------------

-* module name : LOAD_DATA.FEX

-SET &ECHO=ALL;

-SET &CURDATE=&YYMD;
-SET &CDAY=EDIT(&CURDATE,'$$$$$$99');
-RUN

DEFINE FILE CAR
CDATE/I8YYMD=&CURDATE;
CWDAY/A4 = DOWK(CDATE, CWDAY);
END

TABLE FILE CAR
PRINT CDATE CWDAY
WHERE COUNTRY EQ 'ENGLAND'
WHERE CWDAY EQ 'SAT';
WHERE &CDAY LE 7
ON TABLE HOLD
END
-RUN

-SET &CNT=&LINES;
-SET &GOTO = IF &CNT GE 1 THEN ':report' ELSE ':noreport';
-GOTO &GOTO

-:report
-TYPE Generate report today
-INCLUDE generate_report
-GOTO :END

-:noreport
-TYPE No need to generate report
-:END
-EXIT
----------------End fex-----------------------------


7.7.03