Processing Options and Date Fields

ssolberg

VIP Member
Maybe I'm just losing it here but I thought we were able to put something like "*TODAY" or "*TODAY-1" in a processing option Date field to represent "today's date" or "yesterday's date"? This is so a user doesn't have to change the date every time they run the report?
 
Sannan,

I'm Unaware of that ability - I'm ready to learn something new, though, if it can be done...

Generally, I add two processing options.
- Date
- Days Past

If the PO Date is populated, you can use it calculate an RV Date (global), get the number of 'Days Past' and place the RV Date(global) in the Data Selection.

When the PO Date is empty, I pull SL Date Today and calc the days past into the RV Date (global) value.

Don't you hate developers ... This is something that the users should be able to do =D

(db)
 
Hi,

unfortunately, there's no native way to do so in ube processing options.
But if what you need is to modify a data selection to use a dynamic date, you can easily insert code to your ube to do so. You can, for instance :
- add a numeric processing option to set a number of days to add or substract to current date,
Then, in the initialize event of your main ube section (where data selection is set)
- use the system function :
<font class="small">Code:</font><hr /><pre> Set Selection Append Flag( <Yes>) </pre><hr /> , so you can add a criteria
- if you want to substract days, multiply your processing option by -1 :
<font class="small">Code:</font><hr /><pre>PO mnNumDays_MATH01 = [PO mnNumDays_MATH01*-1 </pre><hr />
- create a date variable, and set it using the function «add_days» :
<font class="small">Code:</font><hr /><pre> rpt_jdDate_URDT= add_days([SL DateToday],[PO mnNumDays_MATH01])</pre><hr />
- add your date criteria to the data selection, using the system function Set User Selection :
<font class="small">Code:</font><hr /><pre>Set User Selection(BC User Reserved Date (F4801), <Greater Than or Equal To>, VA rpt_jdDate_URDT, <And>)</pre><hr />

It works fine, we often use it.
 
Back
Top