infor.com
concierge
infor u
developer portal
Home
Groups
FACTS - Partner Community
FACTS job streams, date ranges, and templates
salbritton
Has anyone figured out a way to flexibly handle date ranges on report parameters entry with job streams in FACTS?
For example, a customer may want to print the commissions report for each sales rep each month, so they set up a template for each sales rep, then set up a job stream that prints the report for each template created. However, the report has beginning and ending time fence inputs.
The only way I can think of handling this would be to essentially "hard code" in each report something to the effect of:
If the job stream 'ABC' is running, assume a beginning date of 'X' days prior to the current date and an ending date of 'Y' days prior to the current date.
Any clever/unique thoughts you'd be willing to share on this are appreciated!
Brad Kraft
Forsythe Associates, Inc.
Find more posts tagged with
Comments
Legacy Contributor
Not very user friendly but I have used UTLOOK to stuff "-60" in a template date field (meaning 60 days ago.) You also have to modify the report overlay to resolve that if it will be used in a JS.
Jim
slonschek
Here is some code I wrote to always set BEG_DATE$ to beginning of previous month and set END_DATE$ to last day of the previous month. This routine should go in your run proc for the given report.
30100 SET_BEG_END_DATE: ! ^100
30105 setesc 9710; seterr 9810
30107 ! will set the begin_date$ to start of previous month, will set end_date$ to end of previous month
30110 ! LOCAL ! cl 30100-30190,30110
30120 let CUR_MONTH$=dte(0:"%Mz"),DATE$=%D$
30130 while 1
30140 let DATE$=fnDTPLUS$(DATE$,-1)
30150 if CUR_MONTH$=dte(dec($00$+ath(DATE$)):"%Mz") then goto *continue
30160 let END_DATE$=DATE$
30170 let BEGIN_DATE$=hta(bin(jul(num(dte(dec($00$+ath(DATE$)):"%Y")),num(dte(dec($00$+ath(DATE$)):"%Mz")),1),3))
30175 break
30180 wend
30190 return
Make sure you have this function defined somewhere in your program:
18072 def fnDTPLUS$(F_D1$,F_DAYS)=hta(bin(dec(ath(F_D1$))+F_DAYS,3))
Important Links
Community Hubs
Discussion Forums
Groups
Community News
Popular Tags
ION Connect
ION Workflow
ION API Gateway
Syteline Development
CPQ Discussion Ask a Colleague
Infor Data Fabric
Infor Document Management (IDM)
LN Development
FAQs, How-To, and Best Practices
API Usage