Focal Point
Date range in Managed Reporting - how to calculate 'one week from today' daily in RC?

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

May 28, 2009, 10:44 AM
m a c
Date range in Managed Reporting - how to calculate 'one week from today' daily in RC?
Greetings -

Please forgive my lack of syntactical grace - I have just been passed the torch for this tool. I am building a report within Managed Reporting to be run with ReportCaster daily. The date range for the report is 'today' through 'one week from today' so every day we get results for the week ahead. To this end I have two criteria in the selection - SomeDate greater than &YYMD and SomeDate less than (one week from &YYMD). The first selection compiles and executes correctly. How do I add another selection criteria for SomeDate less than one week from today ? SomeDate is in hYYMDm format.

Thank you for your time!

m a c


WF 7.6, Win, TextOutput for consumption within other apps
May 28, 2009, 11:00 AM
GinnyJakes
You will have to create a new variable to test against:

-SET &NEXTWEEK=AYMD(&YYMD,7,'I8YYMD');

Put this at the beginning of your program and then you can use this variable in your WHERE clause.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
May 28, 2009, 11:08 AM
m a c
Thank you the reply! By saying 'Put this at the beginning of your program' are you implying that I create a Field from within Report Assistant ( Field Selection -> New Field ) ?


WF 7.6, Win, TextOutput for consumption within other apps
May 28, 2009, 11:47 AM
GinnyJakes
No, you are going to have to put it in with the text editor. You always want to compare the field in your table to a literal date not the value in another field.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google