Hello all. I am new at this and I would like to try and figure out how to run this for current day - 1. I have begindate and enddate which forces the user to input dates, but I am just looking at grab everything for the prev business date. I am using Report Assistant, is there a Parameter I can use in the Selection Criteria to do this? I know there is tons of information about Date/Time, but I am having a hard time finding anything with Report Assistant.
-* HTML Tool
-* Created by Report Assistant
-* FF Line do not change this line! Field Name
-* FF Line do not change this line! Alias
-* FF Line do not change this line! Format
-* FF Line do not change this line! Segment
-* FF Line do not change this line! displayTree=0
-* J001 J001
TO MULTIPLE PROBLEMDEFS.PROBLEMDEFS.PROBLEMDEF
IN PROBLEMDEFS TAG J001
TABLE FILE TRACKING
SUM MAX.TRACKING.TRACKING.DATEENTERED AS 'DATEENTERED'
BY TRACKING.TRACKING.STORENUMBER AS 'SITE_NUM'
WHERE (TRACKING.TRACKING.PROBLEM EQ '32'
AND (TRACKING.TRACKING.BUSINESSDATE EQ DT(&begindate)
ON TABLE SET STYLE *
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE NOTOTAL
-* End Report Assistant
Whenever I have wanted to do things like that I would use the &YYMD command to pull in todays date. something like this:
DEFINE FILE CAR
WF 7.6.7 Reportting Server
Dev Studio 7.6.7
If you want a quick win in RA this is messy and you may be better off getting the user to enter the last business date.
AND (TRACKING.TRACKING.BUSINESSDATE EQ DT(&EnterLastBusinessDate)
You will have to define a field
TODAY/MDYY WITH TRACKING.TRACKING.BUSINESSDATE = '&DATEMDYY' ;
LSTBUSDAY/MDYY = DATEMOV(TODAY,'BD-') ;
WHERE TRACKING.TRACKING.BUSINESSDATE EQ LSTBUSDAY in the where clauses
This will work but run like a pig since wf will be carrying out the date screening not the rdbms
Outside RA you can do this more neatly but if you want to stick with RA get the user to enter the date!
Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
Thanks for the help. After a few attempts, I decided just to leave it with the begin and end dates. This will probably work better for us.
-* subtract 1 from current date also get current month and year from system date
-SET &TODAY = &YYMD - 1;
-SET &CYR = EDIT(&TODAY,'9999$$$$');
-SET &CMO = EDIT(&TODAY,'$$$$99$$');
-SET &CDA = EDIT(&TODAY,'$$$$$$99');
-SET &YESTERDAY = &CYR ||'/'||&CMO||'/'||&CDA;
WHERE TRACKING.TRACKING.BUSINESSDATE EQ '&YESTERDAY';
WF 8 version 8.2.04. Windows.
In focus since 1990.
|Powered by Social Strata|