Focal Point
[Solved]Error FOC160

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

May 05, 2010, 10:12 PM
Kevin Tong
[Solved]Error FOC160
Hi Guys,

Hope you guys can help me out, I encountered error (FOC160) THE OPTION AFTER THE WORD 'FORMAT' IS INVALID: WFFMT on the following code.

quote:

TABLE FILE CUST
SUM
'CUST.CUST.MALE' AS 'Male'
'CUST.CUST.FEMALE' AS 'Female'
BY 'CUST.CUST.AGERANGE' AS 'Age Range'
ON TABLE SUBHEAD
" "
" "
HEADING
"APPLICATION APPROVED FROM <+0>&dateFrom <+0>TO<+0> <+0>&dateTo"
" "
"AGE VS GENDER"
" "
FOOTING
" "
" "
" "
"Private & Confidential"
"Report Generated On <+0>&DATEtrDMYY<+0> "
WHERE CUST.CUST.IPFDAT NE 0;
WHERE J0.APPL.ANAVST EQ '009';
WHERE STDT GE DATEFROM;
WHERE STDT LE DATETO;
WHERE CUST.CUST.IPFDAT NE 0;
ON TABLE SET PAGE-NUM ON
ON TABLE ROW-TOTAL/I11 AS 'Total'
ON TABLE SUMMARIZE AS 'Total'
ON TABLE PCHOLD FORMAT &WFFMT
ON TABLE SET HTMLCSS ON


&WFFMT is obtained from a HTML select with the name of WFFMT.

Thanks and hope to hear from you guys.


Regards,
Kevin Tong

This message has been edited. Last edited by: Kevin Tong,


WebFOCUS 7.6.9
Windows 2003, all output
May 05, 2010, 10:59 PM
njsden
quote:
&WFFMT is obtained from a HTML select with the name of WFFMT.


What value does &WFFMT have in your request? It seems that the value provided was "WFFMT"which is obviously not a valid format.

Can you run:
-TYPE WFFMT = &WFFMT
right before your TABLE FILE statement to determine exactly what value is your focexec receiving?

You may also want to take a look at the HTMl <select> item to determine exactly which values are being passed.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
May 05, 2010, 11:01 PM
njsden
Better yet, just add
-SET &ECHO=ON;
before TABLE FILE and run the whole thing. If you still get the error message, it sould be very simple to determine exactly what code is being processed after &WFFMT have been resolved.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
May 06, 2010, 07:48 AM
ERINP
Kevin,
If you picked 'User' in the output type you have a choice of which outputs you would like to have for any given report:
 ON TABLE PCHOLD FORMAT &WFFMT.(<HTML,HTML>,<PDF,PDF>,<Excel 2000,EXL2K>).Select Output. 
This line of code will provide a drop down with the output choices of HTML, PDF, or Excel 2000. It will have a heading in the auto prompt that says "Select Output". All of the 'Periods' in the line of code are required for this to work properly. The other option would be to create an amper variable called &WFFMT. Use a -DEFAULT and a -SET with an if statement to allow for the different output types. Example:
-DEFAULT &WFFMT_out = 'XL';
-SET &WFFMT  = IF &WFFMT_out EQ 'HT' THEN 'HTML' ELSE IF &WFFMT_out EQ 'XL' THEN 'EXL2K' ELSE 'HTML';
ON TABLE PCHOLD FORMAT &WFFMT

I hope this helps...
Erin P


WebFOCUS 7.6.9

Reporting client Windows 2003 Service pack 2 using IIS and TomCat 5.5
Reporting Server OS/400 V5R4M0
Outputs: HTML, Excel, PDF, CSV, and Flat Files