Focal Point
[SOLVED] pass time as report parameters

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

May 01, 2019, 08:26 AM
sumant
[SOLVED] pass time as report parameters
Hello,

I have a request where rejected payments need to be monitored and alert the users.
Once a payment is rejected, it will be time stamped in the database.

I need to schedule a report every 10 minutes that checks for rejected payments.
The report should run every 10 minutes and bring in data that populated only in those 10 minutes.

Passing current date as a parameter for the report will keep bringing the old data along with the new data.

Any suggestions on how this can be done.

Thanks in advance.

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 7.7.02Windows
Output Formats: Excel, HTML, PDF
May 01, 2019, 08:53 AM
MartinY
You already have defined all the elements that you need :

1- A date/time parameter from current date-time where you will substract 10 minutes
Take a look at
Simplified Date and Date-Time Functions
Date-Time Functions
2- Create a report filtered using above field
3- Create a schedule (RC) that will execute every 10 minutes


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
May 01, 2019, 09:37 AM
jfr99
Something like this ...

-*
-SET &CURR_DTS_HYYMDS = HGETC(8, 'HYYMDS');
-SET &CURR_DTS        = HCNVRT(&CURR_DTS_HYYMDS, '(HYYMDS)', 20, 'A20');
-SET &END_DTS         = EDIT(&CURR_DTS, '99999999999999999') | '59';
-*
-SET &PREV_10M_HYYMDS = HADD(&CURR_DTS_HYYMDS, 'MINUTES', -10, 8, 'HYYMDS');
-SET &PREV_10M_DTS    = HCNVRT(&PREV_10M_HYYMDS, '(HYYMDS)',20,'A20');
-SET &BEG_DTS         = EDIT(&PREV_10M_DTS, '99999999999999999') | '00';
-*
-TYPE -----------------------------------------
-TYPE CURR_DTS ------------ &CURR_DTS
-TYPE PREV_10M_DTS -------- &PREV_10M_DTS
-TYPE -----------------------------------------
-TYPE BEG_DTS ------------- &BEG_DTS
-TYPE END_DTS ------------- &END_DTS
-TYPE -----------------------------------------
-TYPE WHERE YOUR_DATE GE DT(&BEG_DTS) AND YOUR_DATE LE DT(&END_DTS);
-TYPE -----------------------------------------



WebFocus 8.201M, Windows, App Studio
May 01, 2019, 10:22 AM
MartinY
Simplified functions are more simple to used
DEFINE FILE WF_RETAIL_LITE
CURRDATE /HYYMDs WITH COUNTRY_NAME = DT_CURRENT_DATETIME(SECOND);
DATEH_10 /HYYMDs = DTADD(CURRDATE, MINUTE, -10);
END
TABLE FILE WF_RETAIL_LITE
SUM CURRDATE
    DATEH_10
ON TABLE SET PAGE NOPAGE
END



WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
May 01, 2019, 02:56 PM
sumant
Thanks a lot for the replies. It helped a lot.


WebFOCUS 7.7.02Windows
Output Formats: Excel, HTML, PDF