I'm prompting the user for &variables to get the date range for the report.
I want to print the &variable in report. Please see the following code and error.
TABLE FILE F4111 PRINT ILLITM AS 'Item' IMDSC1 AS 'Description' ILLOCN AS 'Location' ILTRQT1 AS 'Qty' ILPAID AS 'Ext Cost/Price' ILUSER AS 'By' ILTDAY AS 'Time' ILRCD_CODE AS 'Reason' ILRCD_CODE_DESC_1 AS 'Reason Desc' ILRCD_CODE_DESC_2 AS 'Reason Desc 2' '&Enter_Start_Date_YYYYMMDD' AS 'Reported Start Date' '&Enter_End_Date_YYYYMMDD' AS 'Reported End Date' BY ILDCT_CODE AS 'Trans Type' BY ILDCT_CODE_DESC_1 AS 'Trans Desc' BY ILDGL/MDYY AS 'Date' BY ILDOC AS 'Document' WHERE ILDGL GE &Enter_Start_Date_YYYYMMDD; WHERE ILMMCU EQ ' 4333'; WHERE ILDGL LE &Enter_End_Date_YYYYMMDD;
0 ERROR AT OR NEAR LINE 14 IN PROCEDURE ADHOCRQ FOCEXEC * (FOC003) THE FIELDNAME IS NOT RECOGNIZED: 20090631 BYPASSING TO END OF COMMAND (FOC009) INCOMPLETE REQUEST STATEMENT
The error code shows 20090631 which is the date I entered at run time.
Thanks, DarenThis message has been edited. Last edited by: Daren,
Web Focus 7.6.5 JDE World
July 01, 2009, 08:48 AM
ac1
Try in this way:
DEFINE FILE F4111
START_DATE /YYMD = &Enter_Start_Date_YYYYMMDD;
END_DATE /YYMD = &Enter_End_Date_YYYYMMDD;
END
-*
TABLE FILE F4111
PRINT
ILLITM AS 'Item'
IMDSC1 AS 'Description'
ILLOCN AS 'Location'
ILTRQT1 AS 'Qty'
ILPAID AS 'Ext Cost/Price'
ILUSER AS 'By'
ILTDAY AS 'Time'
ILRCD_CODE AS 'Reason'
ILRCD_CODE_DESC_1 AS 'Reason Desc'
ILRCD_CODE_DESC_2 AS 'Reason Desc 2'
START_DATE AS 'Reported Start Date'
END_DATE AS 'Reported End Date'
......
Or just put the fields in the heading, since they never change:
TABLE FILE F4111
HEADING
"Reported Start Date &Enter_Start_Date_YYYYMMDD "
"Reported End Date &Enter_End_Date_YYYYMMDD "
PRINT
ILLITM AS 'Item'
IMDSC1 AS 'Description'
ILLOCN AS 'Location'
ILTRQT1 AS 'Qty'
ILPAID AS 'Ext Cost/Price'
ILUSER AS 'By'
ILTDAY AS 'Time'
ILRCD_CODE AS 'Reason'
ILRCD_CODE_DESC_1 AS 'Reason Desc'
ILRCD_CODE_DESC_2 AS 'Reason Desc 2'
BY ILDCT_CODE AS 'Trans Type'
BY ILDCT_CODE_DESC_1 AS 'Trans Desc'
BY ILDGL/MDYY AS 'Date'
BY ILDOC AS 'Document'
WHERE ILDGL GE &Enter_Start_Date_YYYYMMDD;
WHERE ILMMCU EQ ' 4333';
WHERE ILDGL LE &Enter_End_Date_YYYYMMDD;
...
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
July 01, 2009, 10:20 AM
Daren
Thanks AC1 it worked great.
Web Focus 7.6.5 JDE World
July 01, 2009, 10:57 AM
Tony A
Daren,
Be aware that as you are using a PRINT verb then using the DEFINEs is no real difference to using COMPUTEs. However if you use a SUM verb then using COMPUTEs will mean the temporary fields will only be created for each row of data output as opposed to DEFINEs where these are created for each row of input.
If your table is small then no big deal either, but if your table is huge then take the above into account.
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10