Focal Point
[SOLVED] Retrieve data for the last 10 days report

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

September 19, 2017, 01:51 PM
Badr.A
[SOLVED] Retrieve data for the last 10 days report
Hi,
I'm new to the App studio(co-op student) and as a first task I have to create a report that retrieve some date, but the date need to be for the last 10 days. I'm stuck in the part how to display the last ten days data?
thank you!

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


WebFocus App Studio
V8201
September 19, 2017, 02:10 PM
FP Mod Chuck
Hi Badr.A

Welcome to Focal Point. This is a great place to get answers to your development questions.

You will need to set a variable to use in your WHERE statement.

This dialog manager code will go before the actual report.


-SET &&P10DAY=AYMD(&YYMD,-10,'I8YYMD');


Then your WHERE statement will be

WHERE DATEFIELD GE &&P10DAY


DATEFIELD will be the name of the date field you want to compare to.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
September 19, 2017, 03:04 PM
Badr.A
Thank you Chuck Wolff,
I need to confirm what I did I added:
-SET &&P10DAY=AYMD(&YYMD,-10,'I8YYMD');
To the very top of the TEXT EDITOR, then I create an advanced where clause:
START_TIME GE &&P10DAY
START_TIME: is the name of the field in need to compare with.
what if I need to show the last 5 days,would I change only the numbers from 10 to 05?

thank you!
quote:
Originally posted by Chuck Wolff:
Hi Badr.A

Welcome to Focal Point. This is a great place to get answers to your development questions.

You will need to set a variable to use in your WHERE statement.

This dialog manager code will go before the actual report.


-SET &&P10DAY=AYMD(&YYMD,-10,'I8YYMD');


Then your WHERE statement will be

WHERE DATEFIELD GE &&P10DAY


DATEFIELD will be the name of the date field you want to compare to.



WebFocus App Studio
V8201
September 19, 2017, 03:28 PM
FP Mod Chuck
Hi Badr

Yes you would change it from 10 to 5.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats